:root {
  --bg: #f7f2eb;
  --card: #fffdf9;
  --ink: #211c18;
  --muted: #6b5f56;
  --line: #dccfbf;
  --accent: #9c5034;
  --focus: #9c5034;
  --error: #b42318;
  --ok: #2f6b45;
  --radius: 14px;
  color-scheme: light;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.6 system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}
.wrap { width: min(100% - 2rem, 880px); margin-inline: auto; }
.skip { position: absolute; left: 1rem; top: -4rem; background: var(--ink); color: #fff; padding: .6rem 1rem; border-radius: 8px; }
.skip:focus { top: 1rem; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }

.top { padding: 3.5rem 0 2rem; }
.eyebrow { margin: 0 0 .5rem; font-size: .75rem; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; color: var(--accent); }
h1 { margin: 0; font: 400 clamp(2.2rem, 6vw, 3.4rem)/1.05 Georgia, 'Times New Roman', serif; letter-spacing: -.02em; }
.lead { max-width: 60ch; color: var(--muted); font-size: 1.05rem; }
.client { font-size: .9rem; color: var(--muted); }

.alert { padding: .9rem 1.1rem; border-radius: 10px; margin-top: 1rem; }
.alert--error { background: #fdecea; color: var(--error); }

form { display: grid; gap: 1.25rem; padding-bottom: 7rem; }
.card { margin: 0; padding: 1.5rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); min-width: 0; }
legend { padding: 0 .4rem; font-weight: 700; font-size: 1.1rem; display: flex; align-items: center; gap: .6rem; }
legend small { font-weight: 400; color: var(--muted); font-size: .85rem; }
.num { display: inline-grid; place-items: center; width: 1.8rem; height: 1.8rem; border-radius: 50%; background: var(--ink); color: #fff; font-size: .85rem; }
.hint { margin: .25rem 0 1rem; color: var(--muted); font-size: .92rem; }

.grid { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr)); }
.grid--3 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 12rem), 1fr)); }
.grid--4 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 11rem), 1fr)); }
.field { display: block; font-size: .9rem; font-weight: 600; margin-bottom: .9rem; }
.field > input, .field > textarea { display: block; margin-top: .35rem; }
input, textarea {
  width: 100%;
  font: inherit;
  font-weight: 400;
  color: inherit;
  padding: .7rem .85rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
}
textarea { resize: vertical; }
input:focus, textarea:focus { border-color: var(--accent); outline: none; box-shadow: 0 0 0 3px rgb(156 80 52 / .15); }
.req { color: var(--accent); }
.check { display: flex; gap: .65rem; align-items: flex-start; margin: .6rem 0; font-size: .95rem; }
.check input { width: 1.15rem; height: 1.15rem; margin-top: .2rem; flex: none; accent-color: var(--accent); }

.upload { border: 1.5px dashed var(--line); border-radius: 12px; padding: 1rem; margin: 1rem 0; background: #fffaf3; }
.upload__label { display: block; font-weight: 600; font-size: .92rem; margin-bottom: .6rem; }
.upload input[type=file] { padding: .5rem; background: transparent; border: 0; }
.files { list-style: none; padding: 0; margin: .5rem 0 0; display: grid; gap: .6rem; }
.file { display: grid; grid-template-columns: 64px 1fr auto; gap: .8rem; align-items: center; padding: .5rem; border-radius: 10px; background: #fff; border: 1px solid var(--line); }
.file img { width: 64px; height: 64px; object-fit: cover; border-radius: 8px; background: var(--bg); }
.file__meta { display: grid; gap: .35rem; min-width: 0; }
.file__name { font-size: .85rem; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file__meta input { padding: .45rem .6rem; font-size: .9rem; }
.file__warn { color: var(--error); font-size: .82rem; }

.item { position: relative; padding: 1rem; border: 1px solid var(--line); border-radius: 12px; margin-bottom: 1rem; background: #fff; }
.repeat:empty::before { content: 'Még nincs elem.'; display: block; color: var(--muted); font-size: .9rem; margin-bottom: .75rem; }

.themes { display: grid; gap: .75rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 13rem), 1fr)); margin-bottom: 1rem; }
.theme { position: relative; display: grid; gap: .3rem; padding: 1rem; border: 1.5px solid var(--line); border-radius: 12px; cursor: pointer; background: #fff; }
.theme input { position: absolute; opacity: 0; }
.theme:has(input:checked) { border-color: var(--accent); box-shadow: 0 0 0 3px rgb(156 80 52 / .15); }
.theme:has(input:focus-visible) { outline: 2px solid var(--focus); outline-offset: 2px; }
.theme small { color: var(--muted); }
.theme__swatch { height: 3.2rem; border-radius: 8px; margin-bottom: .4rem; }
.theme--editorial .theme__swatch { background: linear-gradient(120deg, #f7f2eb 0 55%, #9c5034 55% 70%, #211c18 70%); border: 1px solid var(--line); }
.theme--energetic .theme__swatch { background: linear-gradient(120deg, #0c0c0d 0 55%, #d4ff3f 55% 72%, #ff6a47 72%); }
.theme--unsure .theme__swatch { background: repeating-linear-gradient(45deg, #eee5d9 0 10px, #fff 10px 20px); border: 1px solid var(--line); }

.btn { font: inherit; font-weight: 700; border-radius: 999px; padding: .8rem 1.5rem; cursor: pointer; border: 1px solid transparent; }
.btn--primary { background: var(--ink); color: #fff; }
.btn--primary:disabled { opacity: .5; cursor: not-allowed; }
.btn--ghost { background: transparent; border-color: var(--ink); color: var(--ink); }
.link-btn { font: inherit; font-size: .85rem; background: none; border: 0; color: var(--error); cursor: pointer; padding: .3rem; text-decoration: underline; }

.submitbar { position: fixed; inset: auto 0 0 0; background: rgb(247 242 235 / .94); backdrop-filter: blur(8px); border-top: 1px solid var(--line); padding: .85rem 0; }
.submitbar__inner { display: flex; align-items: center; gap: 1rem; justify-content: flex-end; flex-wrap: wrap; }
.status { flex: 1 1 16rem; font-size: .9rem; color: var(--muted); }
.status[data-kind='error'] { color: var(--error); font-weight: 600; }
progress { flex: 0 1 12rem; height: .5rem; accent-color: var(--accent); }

.done { padding: 4rem 0; }
.done h2 { font: 400 2.4rem/1.1 Georgia, serif; color: var(--ok); }

@media (prefers-reduced-motion: no-preference) {
  .btn { transition: transform .2s; }
  .btn:hover:not(:disabled) { transform: translateY(-1px); }
}
