/* Korean with Daniel — shared design system.
   One set of colours, type sizes, spacing, buttons, cards and status labels for every
   main page. Sizes follow a 4px spacing scale. System fonts only: no web-font downloads,
   so pages stay fast for students on mobile data and behind slow connections. */
:root{
  --kwd-green-950:#12261f;
  --kwd-green-900:#1a382e;
  --kwd-green-800:#1f4638;
  --kwd-green-700:#245744;   /* primary action */
  --kwd-green-600:#2f6c55;
  --kwd-green-200:#c9dccb;
  --kwd-green-100:#e2ede0;
  --kwd-green-50:#f0f5ec;
  --kwd-paper:#fffdf8;       /* cards */
  --kwd-cream:#f5f2e9;       /* page background */
  --kwd-ink:#1b241f;         /* main text */
  --kwd-muted:#55625a;       /* supporting text (4.5:1 on cream) */
  --kwd-line:#ddd8ca;
  --kwd-gold:#a8742a;        /* single accent: highlights and "this week" */
  --kwd-gold-50:#fbf2df;
  --kwd-red:#a5392a;
  --kwd-red-50:#fbeae6;
  --kwd-blue:#2b5f8a;
  --kwd-blue-50:#e8f0f7;
  --kwd-radius:16px;
  --kwd-radius-sm:10px;
  --kwd-shadow:0 1px 2px rgba(27,36,31,.05),0 8px 24px rgba(27,36,31,.06);
  --kwd-font:system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI","PingFang SC","Microsoft YaHei","Apple SD Gothic Neo","Malgun Gothic","Noto Sans KR","Noto Sans SC",sans-serif;
  --kwd-max:1120px;
}

/* ---------- Shared top bar ---------- */
.kwd-shell{position:sticky;top:0;z-index:900;background:rgba(245,242,233,.94);backdrop-filter:saturate(1.4) blur(10px);-webkit-backdrop-filter:saturate(1.4) blur(10px);border-bottom:1px solid var(--kwd-line);font-family:var(--kwd-font);color:var(--kwd-ink);padding-top:env(safe-area-inset-top)}
.kwd-shell *{box-sizing:border-box}
.kwd-shell-inner{max-width:var(--kwd-max);margin:0 auto;padding:10px 20px;display:flex;align-items:center;gap:16px;min-height:60px}
.kwd-shell-brand{display:flex;align-items:center;gap:10px;color:inherit;text-decoration:none;font-weight:800;font-size:16px;letter-spacing:-.01em;white-space:nowrap;flex:0 0 auto}
.kwd-shell-mark{width:36px;height:36px;border-radius:11px;background:var(--kwd-green-800);color:#fff;display:grid;place-items:center;font-size:17px;font-weight:800;flex:0 0 36px}
.kwd-shell-nav{display:flex;align-items:center;gap:4px;flex:1 1 auto;min-width:0}
.kwd-shell-nav a{display:inline-flex;align-items:center;min-height:40px;padding:6px 12px;border-radius:10px;color:var(--kwd-muted);text-decoration:none;font-size:15px;font-weight:650;white-space:nowrap}
.kwd-shell-nav a:hover{background:var(--kwd-green-50);color:var(--kwd-green-800)}
.kwd-shell-nav a[aria-current=page]{background:var(--kwd-green-100);color:var(--kwd-green-900)}
.kwd-shell-tools{display:flex;align-items:center;gap:8px;flex:0 0 auto}
.kwd-shell-lang{display:inline-flex;padding:3px;gap:2px;border:1px solid var(--kwd-line);border-radius:999px;background:var(--kwd-paper)}
.kwd-shell-lang button{font:inherit;font-size:13px;font-weight:700;min-height:32px;padding:4px 10px;border:0;border-radius:999px;background:transparent;color:var(--kwd-muted);cursor:pointer;box-shadow:none}
.kwd-shell-lang button[aria-pressed=true]{background:var(--kwd-green-800);color:#fff}
.kwd-shell-account{display:inline-flex;align-items:center;gap:8px;min-height:40px;max-width:220px;padding:6px 14px;border-radius:999px;border:1px solid var(--kwd-green-700);background:var(--kwd-green-700);color:#fff;text-decoration:none;font-size:14px;font-weight:700;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.kwd-shell-account[data-state=in]{background:var(--kwd-paper);color:var(--kwd-green-900);border-color:var(--kwd-green-200)}
.kwd-shell-account[data-state=in]::before{content:"";width:8px;height:8px;border-radius:50%;background:var(--kwd-green-600);flex:0 0 8px}
.kwd-shell-account[data-attention=true]::before{background:var(--kwd-gold)}
.kwd-shell a:focus-visible,.kwd-shell button:focus-visible{outline:3px solid var(--kwd-gold);outline-offset:2px}
.kwd-skip{position:absolute;left:-999px;top:8px;background:var(--kwd-green-900);color:#fff;padding:10px 14px;border-radius:10px;z-index:1000;font-family:var(--kwd-font)}
.kwd-skip:focus{left:8px}
@media(max-width:1040px){
  .kwd-shell-inner{flex-wrap:wrap;gap:6px 10px;padding:8px 14px}
  .kwd-shell-brand span.kwd-shell-name{font-size:15px}
  .kwd-shell-tools{margin-left:auto}
  .kwd-shell-nav{order:3;flex:1 0 100%;overflow-x:auto;scrollbar-width:none;margin:0 -14px;padding:0 10px 2px}
  .kwd-shell-nav::-webkit-scrollbar{display:none}
  .kwd-shell-nav a{min-height:44px;font-size:14px;padding:6px 11px}
  .kwd-shell-account{max-width:132px;padding:6px 11px;font-size:13px}
  .kwd-shell-lang button{padding:4px 8px;font-size:12px}
}
@media(max-width:380px){.kwd-shell-name{display:none}}

.kwd-shell.is-static{position:static}

/* ---------- Building blocks ---------- */
.kwd-btn{display:inline-flex;align-items:center;justify-content:center;gap:8px;min-height:48px;padding:12px 20px;border-radius:12px;border:1px solid var(--kwd-green-700);background:var(--kwd-green-700);color:#fff;font:inherit;font-size:16px;font-weight:700;text-decoration:none;cursor:pointer;box-shadow:none;transition:background-color .15s,border-color .15s,transform .05s}
.kwd-btn:hover{background:var(--kwd-green-800);border-color:var(--kwd-green-800)}
.kwd-btn:active{transform:translateY(1px)}
.kwd-btn.is-quiet{background:var(--kwd-paper);color:var(--kwd-green-900);border-color:var(--kwd-green-200)}
.kwd-btn.is-quiet:hover{background:var(--kwd-green-50);border-color:var(--kwd-green-600)}
.kwd-btn.is-small{min-height:44px;padding:8px 14px;font-size:14px;border-radius:10px}
.kwd-btn:focus-visible,.kwd-card a:focus-visible{outline:3px solid var(--kwd-gold);outline-offset:2px}
.kwd-card{background:var(--kwd-paper);border:1px solid var(--kwd-line);border-radius:var(--kwd-radius);padding:24px;box-shadow:var(--kwd-shadow)}
.kwd-eyebrow{display:block;font-size:13px;font-weight:750;letter-spacing:.06em;text-transform:uppercase;color:var(--kwd-green-600);margin:0 0 8px}
.kwd-status{display:inline-flex;align-items:center;gap:6px;padding:4px 10px;border-radius:999px;font-size:13px;font-weight:700;line-height:1.3;background:#ece9df;color:var(--kwd-muted);white-space:nowrap}
.kwd-status::before{content:"";width:7px;height:7px;border-radius:50%;background:currentColor;flex:0 0 7px}
.kwd-status[data-status=submitted]{background:var(--kwd-blue-50);color:var(--kwd-blue)}
.kwd-status[data-status=reviewed]{background:var(--kwd-green-100);color:var(--kwd-green-800)}
.kwd-status[data-status=retry]{background:var(--kwd-gold-50);color:#7a5216}
.kwd-status[data-status=draft]{background:var(--kwd-gold-50);color:#7a5216}

/* Classroom TVs and projectors: scale the whole interface up so the back row can read it. */
@media(min-width:1800px){
  :root{--kwd-max:1360px}
  .kwd-shell-inner{min-height:72px}
  .kwd-shell-brand{font-size:19px}.kwd-shell-nav a{font-size:18px;min-height:48px}
  .kwd-shell-account{font-size:16px;min-height:46px;max-width:280px}.kwd-shell-lang button{font-size:15px;min-height:38px}
  .kwd-btn{font-size:19px;min-height:56px}.kwd-status{font-size:15px}
}
@media(prefers-reduced-motion:reduce){.kwd-btn{transition:none}}
