/* Napp. Concept: every job is a small poster — a colour band in the employer's own hue (--h, set per card)
   on a tactile, slightly fanned stack. One phone-width column; the stack is the loud part, everything else stays quiet. */
@font-face { font-family: "Bricolage Grotesque"; src: url(fonts/bricolage.woff2) format("woff2"); font-weight: 200 800; font-display: swap }
@font-face { font-family: Inter; src: url(fonts/inter.woff2) format("woff2"); font-weight: 100 900; font-display: swap }
:root {
  --bg: #f3f5fb; --surface: #ffffff; --fg: #10162b; --muted: #566080; --line: #dfe4f0; --chip: #eef1f8;
  --accent: #2b44e0; --on-accent: #ffffff; --yes: #0c9b6a; --no: #e0452f; --sun: #ffcf3d;
  --shadow: 0 1px 2px rgba(16, 22, 43, .06), 0 14px 34px rgba(16, 22, 43, .13);
  --display: "Bricolage Grotesque", "Segoe UI", system-ui, sans-serif;
  --body: Inter, "Segoe UI", system-ui, sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) { :root {
  --bg: #0c1122; --surface: #171e36; --fg: #f0f3fb; --muted: #9aa6c4; --line: #283154; --chip: #212a48;
  --accent: #8fa2ff; --on-accent: #0c1122; --yes: #3ddba0; --no: #ff7d68; --sun: #ffd65a;
  --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 14px 34px rgba(0, 0, 0, .5); color-scheme: dark } }

*, *::before, *::after { box-sizing: border-box }
[hidden] { display: none !important }
html, body { height: 100% }
body { margin: 0; color: var(--fg); font: 15px/1.5 var(--body); overflow-x: hidden;
  background:
    radial-gradient(60rem 30rem at 90% -10%, color-mix(in srgb, var(--accent) 15%, transparent), transparent 60%),
    radial-gradient(42rem 26rem at -10% 105%, color-mix(in srgb, var(--sun) 18%, transparent), transparent 60%),
    var(--bg);
  background-attachment: fixed }
button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none }
a { color: var(--accent); font-weight: 600; text-decoration: none }
a:hover { text-decoration: underline }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px }

.app { max-width: 460px; min-height: 100%; margin: 0 auto; display: flex; flex-direction: column; gap: 16px;
  padding-block: 18px; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)) }
header { display: flex; align-items: center; justify-content: space-between; gap: 12px }
h1 { font: 800 28px/1 var(--display); margin: 0; letter-spacing: -.03em; display: flex; align-items: center }
h1::before { content: ""; width: 20px; height: 26px; border-radius: 6px; background: var(--accent); transform: rotate(-10deg); margin-right: 14px;
  box-shadow: 7px 3px 0 -1px var(--sun) }
h1 span { color: var(--accent) }
nav { display: flex; gap: 2px; background: var(--surface); border: 1px solid var(--line); padding: 4px; border-radius: 999px }
nav button { padding: 6px 12px; border-radius: 999px; font-weight: 600; color: var(--muted); transition: background .15s, color .15s }
nav button:hover { color: var(--fg) }
nav button[aria-pressed="true"] { background: var(--fg); color: var(--bg) }
#count { font-variant-numeric: tabular-nums; color: var(--accent) }
nav button[aria-pressed="true"] #count { color: inherit; opacity: .7 }

.view { flex: 1; display: flex; flex-direction: column; gap: 16px; min-height: 0 }
.note { margin: 0; font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted);
  display: flex; justify-content: space-between; gap: 12px }
.note b { color: var(--fg); font-variant-numeric: tabular-nums }
.small { margin: 0; font-size: 13px; color: var(--muted) }
.none { color: var(--muted); text-align: center; padding: 48px 12px; border: 2px dashed var(--line); border-radius: 24px; margin: 0 }

/* ---------- card stack ---------- */
#deck { position: relative; flex: 1; min-height: 450px; margin-bottom: 22px }
.card { position: absolute; inset: 0; background: var(--surface); border-radius: 26px; box-shadow: var(--shadow);
  display: flex; flex-direction: column; overflow: hidden; touch-action: pan-y; user-select: none; cursor: grab;
  transition: transform .25s ease, opacity .25s ease; animation: rise .25s ease }
.card.drag { transition: none; cursor: grabbing }
.card.back { transform: translateY(13px) scale(.96) rotate(1.8deg); pointer-events: none; animation: none; filter: brightness(.97) }
.card.back2 { transform: translateY(25px) scale(.92) rotate(-2.4deg); pointer-events: none; animation: none; filter: brightness(.94) }
@keyframes rise { from { transform: translateY(13px) scale(.96) rotate(1.8deg) } }
.band { background: hsl(var(--h) 62% 44%); color: #fff; padding: 20px 22px 18px; display: flex; gap: 14px; align-items: center;
  background-image: radial-gradient(circle at 100% 0, hsl(calc(var(--h) + 40) 80% 60% / .55), transparent 55%) }
.band .logo { background: #fff; color: hsl(var(--h) 62% 36%) }
.band small { color: rgb(255 255 255 / .85) }
.logo { flex: none; width: 54px; height: 54px; border-radius: 16px; display: grid; place-items: center;
  font: 800 26px/1 var(--display); color: #fff; background: hsl(var(--h) 62% 44%) }
.co { min-width: 0; overflow-wrap: anywhere }
.co b { display: block; font-weight: 600; line-height: 1.3 }
.co small { color: var(--muted); font-size: 13px }
.body { flex: 1; min-height: 0; padding: 20px 22px; display: flex; flex-direction: column; gap: 14px }
h2 { font: 800 27px/1.08 var(--display); margin: 0; letter-spacing: -.025em; text-wrap: balance; overflow-wrap: anywhere }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; list-style: none }
.chips li { background: var(--chip); border-radius: 999px; padding: 3px 11px; font-size: 13px; font-weight: 500 }
.chips li.kat { background: hsl(var(--h) 70% 50% / .14); color: color-mix(in srgb, hsl(var(--h) 62% 44%) 70%, var(--fg)) }
.desc { margin: 0; color: var(--muted); flex: 1 1 0; min-height: 0; overflow: hidden;
  -webkit-mask-image: linear-gradient(#000 calc(100% - 30px), transparent); mask-image: linear-gradient(#000 calc(100% - 30px), transparent) }
.frist { padding-top: 13px; border-top: 1px solid var(--line); display: flex; justify-content: space-between; gap: 12px;
  font-size: 13px; color: var(--muted) }
.frist b { color: var(--fg); font-variant-numeric: tabular-nums }
.stamp { position: absolute; top: 34px; z-index: 2; padding: 4px 14px; border: 4px solid; border-radius: 12px; opacity: 0;
  font: 800 28px/1.2 var(--display); letter-spacing: .05em; background: var(--surface) }
.stamp.yes { left: 22px; color: var(--yes); transform: rotate(-12deg) }
.stamp.no { right: 22px; color: var(--no); transform: rotate(12deg) }
.empty { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 12px; text-align: center;
  border: 2px dashed var(--line); border-radius: 26px; padding: 24px; color: var(--muted) }
.empty strong { font: 800 24px/1.2 var(--display); color: var(--fg) }

.actions { display: flex; justify-content: center; align-items: center; gap: 20px }
.actions button { width: 64px; height: 64px; border-radius: 50%; background: var(--surface); box-shadow: var(--shadow);
  display: grid; place-items: center; transition: transform .15s }
.actions button:hover:not(:disabled) { transform: translateY(-3px) scale(1.05) }
.actions button:active:not(:disabled) { transform: scale(.92) }
.actions button:disabled { opacity: .4; cursor: default }
.actions svg { width: 26px; height: 26px; fill: none; stroke: currentColor; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round }
#no { color: var(--no) }
#yes { width: 76px; height: 76px; background: var(--yes); color: var(--surface) }
#yes svg { width: 32px; height: 32px; fill: currentColor }
#undo { width: 46px; height: 46px; color: var(--muted) } #undo svg { width: 20px; height: 20px }
.hint { margin: 0; text-align: center; font-size: 13px; color: var(--muted) }

/* ---------- lists, forms, panels ---------- */
.btn { background: var(--accent); color: var(--on-accent); padding: 10px 20px; border-radius: 999px; font-weight: 600; transition: transform .15s }
.btn:hover:not(:disabled) { transform: translateY(-1px) }
.btn.ghost { background: var(--surface); color: var(--fg); border: 1px solid var(--line) }
.btn:disabled { opacity: .5; cursor: default }
.linkbtn { color: var(--accent); font-weight: 600; padding: 0 }
.danger { color: var(--no) }
.row { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center }
.field { display: flex; flex-direction: column; gap: 6px }
.field label { font-weight: 600 }
textarea, input[type=email], input[type=password] { font: inherit; color: var(--fg); background: var(--surface); border: 1px solid var(--line);
  border-radius: 14px; padding: 12px; width: 100% }
textarea { resize: vertical; min-height: 240px }
.check { display: flex; gap: 8px; align-items: flex-start; font-size: 13px; color: var(--muted) }
.panel { background: var(--surface); border-radius: 26px; box-shadow: var(--shadow); padding: 24px; display: flex; flex-direction: column; gap: 14px }

#saved { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px }
#saved li { background: var(--surface); border-radius: 20px; box-shadow: var(--shadow); padding: 14px;
  display: flex; flex-wrap: wrap; gap: 12px; align-items: center }
#saved .logo { width: 44px; height: 44px; border-radius: 13px; font-size: 20px }
#saved .co { flex: 1 }
#saved .co a { display: block; line-height: 1.3; color: var(--fg) }
#saved .acts { flex-basis: 100%; display: flex; gap: 8px; justify-content: flex-end }
#saved .rm { color: var(--muted); padding: 6px 12px; border-radius: 999px; font-size: 13px; border: 1px solid var(--line) }
#saved .go { padding: 6px 14px; font-size: 13px }
#apply-view h2 { font-size: 24px }

/* ---------- front page ---------- */
.hero { display: flex; flex-direction: column; gap: 10px; padding-top: 8px }
.hero h2 { font-size: clamp(38px, 11vw, 50px); line-height: .98 }
.hero h2 em { font-style: normal; text-decoration: underline; text-decoration-color: var(--sun); text-decoration-thickness: .16em; text-underline-offset: .08em }
.hero p { margin: 0; color: var(--muted); font-size: 16px; max-width: 34ch }
.fan { position: relative; height: 150px; margin: 10px 0 -44px }
#auth-form { position: relative; z-index: 1 }
.fan i { position: absolute; left: 50%; top: 12px; width: 124px; height: 168px; margin-left: -62px; border-radius: 18px; background: var(--surface);
  box-shadow: var(--shadow); overflow: hidden; transform: rotate(var(--r)) translateX(var(--x)); transform-origin: 50% 120% }
.fan i::before { content: ""; display: block; height: 46px; background: hsl(var(--h) 62% 44%) }
.fan i::after { content: ""; display: block; margin: 12px; height: 9px; border-radius: 9px; background: var(--chip); box-shadow: 0 17px 0 var(--chip), -20px 34px 0 var(--chip) }

#toast { position: fixed; left: 50%; bottom: max(20px, env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); max-width: min(400px, calc(100% - 32px));
  background: var(--fg); color: var(--bg); padding: 10px 16px; border-radius: 14px; font-size: 14px; z-index: 20 }
nav button, .note b { white-space: nowrap }
@media (max-width: 430px) {
  h1 { font-size: 23px } h1::before { width: 16px; height: 21px; margin-right: 11px }
  nav button { padding: 6px 9px; font-size: 14px }
}
/* ---------- loading states ---------- */
@keyframes spin { to { transform: rotate(360deg) } }
@keyframes shimmer { from { background-position: 150% 0 } to { background-position: -50% 0 } }
.busy { display: inline-flex; align-items: center; gap: 8px; pointer-events: none }
.busy::before { content: ""; flex: none; width: 14px; height: 14px; border-radius: 50%; border: 2px solid currentColor; border-top-color: transparent;
  animation: spin .7s linear infinite }
.sk { position: relative; flex: 1; min-height: 450px; border-radius: 26px; background: var(--surface); box-shadow: var(--shadow); overflow: hidden;
  display: flex; flex-direction: column; gap: 14px; padding: 0 22px 22px }
.sk i { display: block; height: 14px; border-radius: 8px; background: var(--chip) }
.sk i:nth-child(1) { height: 92px; margin: 0 -22px 8px; border-radius: 0 }
.sk i:nth-child(2) { height: 30px; width: 80% } .sk i:nth-child(3) { height: 30px; width: 55% }
.sk i:nth-child(4) { width: 100%; margin-top: 10px } .sk i:nth-child(5) { width: 70% }
.sk::after, textarea.thinking { background-image: linear-gradient(100deg, transparent 30%, color-mix(in srgb, var(--fg) 7%, transparent) 50%, transparent 70%);
  background-size: 200% 100%; background-repeat: no-repeat; animation: shimmer 1.3s linear infinite }
.sk::after { content: ""; position: absolute; inset: 0 }
@media (prefers-reduced-motion: reduce) { .busy::before, .sk::after, textarea.thinking { animation: none } }
@media (prefers-reduced-motion: reduce) { .card, .actions button, .btn, nav button { transition: none; animation: none } }

/* ---------- document pages ---------- */
.doc { gap: 10px; line-height: 1.6 }
.doc h2 { font-size: 26px }
.doc h3 { font: 800 18px/1.2 var(--display); margin: 14px 0 0 }
.doc p, .doc ul { margin: 0 }
.doc ul { padding-left: 20px; display: flex; flex-direction: column; gap: 6px }
