@font-face { font-family: "Hanken"; src: url("/assets/public/fonts/HankenGrotesk-Regular.ttf") format("truetype"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Hanken"; src: url("/assets/public/fonts/HankenGrotesk-Bold.ttf") format("truetype"); font-weight: 700; font-display: swap; }

:root {
  --navy: #0f1d3a;
  --navy-2: #16294f;
  --blue: #1546b8;
  --blue-soft: #e8eefb;
  --ink: #1b2333;
  --muted: #5d6779;
  --line: #e3e7ef;
  --bg: #f5f7fb;
  --ok: #12805c;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(15, 29, 58, .06), 0 8px 24px rgba(15, 29, 58, .06);
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { font-family: "Hanken", system-ui, -apple-system, Segoe UI, Roboto, sans-serif; color: var(--ink); background: var(--bg); line-height: 1.55; -webkit-font-smoothing: antialiased; }
a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }
button { font: inherit; cursor: pointer; }
img { max-width: 100%; display: block; }

/* Header */
.top { background: var(--navy); color: #fff; position: sticky; top: 0; z-index: 20; }
.top-in { max-width: 1120px; margin: 0 auto; padding: 14px 24px; display: flex; align-items: center; gap: 20px; }
.top .logo { height: 34px; width: auto; }
.top .sp { flex: 1; }
.top .who { font-size: 14px; color: #c9d3ea; text-align: right; }
.top .who b { color: #fff; font-weight: 700; }
.top .out { color: #c9d3ea; font-size: 13px; border: 1px solid rgba(255,255,255,.2); padding: 6px 12px; border-radius: 8px; }
.top .out:hover { color: #fff; text-decoration: none; border-color: rgba(255,255,255,.5); }

.wrap { max-width: 1120px; margin: 0 auto; padding: 28px 24px 120px; }

/* Hero */
.hero { background: linear-gradient(135deg, var(--navy) 0%, var(--navy-2) 60%, #1d3a7a 100%); color: #fff; }
.hero-in { max-width: 1120px; margin: 0 auto; padding: 44px 24px 56px; }
.hero h1 { font-size: 34px; line-height: 1.15; margin: 0 0 10px; letter-spacing: -.01em; }
.hero p { color: #c9d3ea; margin: 0 0 22px; max-width: 640px; font-size: 17px; }
.search { position: relative; max-width: 620px; }
.search input { width: 100%; padding: 15px 18px 15px 46px; border-radius: 12px; border: 0; font: inherit; font-size: 16px; color: var(--ink); box-shadow: 0 6px 20px rgba(0,0,0,.18); }
.search svg { position: absolute; left: 16px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.results { position: absolute; left: 0; right: 0; top: 56px; background: #fff; border-radius: 12px; box-shadow: var(--shadow); overflow: hidden; z-index: 5; }
.results a { display: block; padding: 12px 16px; color: var(--ink); border-bottom: 1px solid var(--line); }
.results a:hover { background: var(--blue-soft); text-decoration: none; }
.results small { display: block; color: var(--muted); }

.quick { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 22px; }
.chip { background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.18); color: #fff; padding: 9px 14px; border-radius: 999px; font-size: 14px; }
.chip:hover { background: rgba(255,255,255,.18); text-decoration: none; }
.chip b { font-weight: 700; }

/* Tracks */
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 18px; margin-top: -34px; }
.card { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: 22px; display: flex; flex-direction: column; gap: 8px; color: var(--ink); border: 1px solid var(--line); }
a.card:hover { text-decoration: none; border-color: #b9c8ec; transform: translateY(-1px); }
.card .ic { width: 42px; height: 42px; border-radius: 10px; background: var(--blue-soft); color: var(--blue); display: grid; place-items: center; }
.card h3 { margin: 6px 0 0; font-size: 18px; }
.card p { margin: 0; color: var(--muted); font-size: 14.5px; flex: 1; }
.bar { height: 6px; background: var(--line); border-radius: 99px; overflow: hidden; margin-top: 6px; }
.bar i { display: block; height: 100%; background: var(--ok); border-radius: 99px; }
.meta { font-size: 13px; color: var(--muted); }

.section-title { font-size: 13px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin: 40px 0 12px; font-weight: 700; }

.hl { display: grid; grid-template-columns: 1.3fr 1fr; gap: 18px; }
@media (max-width: 860px) { .hl { grid-template-columns: 1fr; } }
.panel { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow); }
.panel h3 { margin: 0 0 8px; }
.big-num { font-size: 26px; font-weight: 700; color: var(--navy); letter-spacing: .01em; }
.ways { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin-top: 14px; }
@media (max-width: 640px) { .ways { grid-template-columns: 1fr; } }
.way { border: 1px solid var(--line); border-radius: 12px; padding: 14px; color: var(--ink); }
a.way:hover { text-decoration: none; border-color: #b9c8ec; background: #fafcff; }
.way b { display: block; margin-bottom: 4px; }
.way span { font-size: 13.5px; color: var(--muted); }

/* Track page */
.crumbs { font-size: 14px; color: var(--muted); margin-bottom: 14px; }
.track-head h1 { margin: 0 0 6px; font-size: 30px; }
.track-head p { margin: 0 0 22px; color: var(--muted); max-width: 720px; }
.list { display: flex; flex-direction: column; gap: 10px; }
.item { display: flex; align-items: center; gap: 16px; background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 16px 18px; color: var(--ink); }
a.item:hover { text-decoration: none; border-color: #b9c8ec; }
.item .n { width: 32px; height: 32px; border-radius: 50%; background: var(--blue-soft); color: var(--blue); font-weight: 700; display: grid; place-items: center; flex: none; font-size: 14px; }
.item.done .n { background: #e3f4ec; color: var(--ok); }
.item .t { flex: 1; }
.item .t b { display: block; }
.item .t span { color: var(--muted); font-size: 14px; }
.item .m { color: var(--muted); font-size: 13px; white-space: nowrap; }

/* Article */
.article { display: grid; grid-template-columns: minmax(0, 1fr) 260px; gap: 32px; }
@media (max-width: 960px) { .article { grid-template-columns: 1fr; } .side { display: none; } }
.article h1 { font-size: 30px; line-height: 1.2; margin: 0 0 8px; }
.lead { color: var(--muted); font-size: 17px; margin: 0 0 26px; }
.step { display: grid; grid-template-columns: 36px minmax(0, 1fr); gap: 14px; margin-bottom: 28px; }
.step .n { width: 32px; height: 32px; border-radius: 50%; background: var(--navy); color: #fff; font-weight: 700; display: grid; place-items: center; font-size: 14px; margin-top: 2px; }
.step p { margin: 4px 0 12px; font-size: 16.5px; }
.shot { background: #fff; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; box-shadow: var(--shadow); }
.shot img { width: 100%; cursor: zoom-in; }
.shot.phone { max-width: 340px; }
.shot figcaption { font-size: 13px; color: var(--muted); padding: 9px 14px; border-top: 1px solid var(--line); background: #fbfcfe; }
.tips { background: var(--blue-soft); border-radius: 12px; padding: 16px 20px; margin: 8px 0 26px; }
.tips h4 { margin: 0 0 6px; color: var(--blue); font-size: 14px; text-transform: uppercase; letter-spacing: .06em; }
.tips ul { margin: 0; padding-left: 18px; }
.tips li { margin: 4px 0; }
.nav2 { display: flex; justify-content: space-between; gap: 12px; border-top: 1px solid var(--line); padding-top: 18px; margin-top: 10px; }
.btn { display: inline-flex; align-items: center; gap: 8px; background: var(--blue); color: #fff; border: 0; border-radius: 10px; padding: 11px 18px; font-weight: 700; }
.btn:hover { background: #103a9b; text-decoration: none; }
.btn.ghost { background: #fff; color: var(--blue); border: 1px solid #c8d4f0; }
.btn.ghost:hover { background: var(--blue-soft); }
.btn.ok { background: var(--ok); }
.side .box { position: sticky; top: 92px; background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 16px; }
.side h4 { margin: 0 0 8px; font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.side a { display: block; padding: 6px 8px; border-radius: 8px; font-size: 14px; color: var(--ink); }
.side a.cur { background: var(--blue-soft); color: var(--blue); font-weight: 700; }
.side a:hover { text-decoration: none; background: #f3f6fc; }
video { width: 100%; border-radius: 12px; background: #000; box-shadow: var(--shadow); }
strong { font-weight: 700; }

/* Lightbox */
.lb { position: fixed; inset: 0; background: rgba(10, 18, 36, .86); display: grid; place-items: center; z-index: 60; padding: 24px; cursor: zoom-out; }
.lb img { max-width: min(1200px, 96vw); max-height: 92vh; border-radius: 10px; }

/* Card (printable) */
.qr { background: #fff; border: 2px solid var(--navy); border-radius: 18px; padding: 30px; max-width: 760px; }
.qr .head { display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); padding-bottom: 14px; margin-bottom: 18px; }
.qr .head img { height: 34px; }
.qr h2 { margin: 0; font-size: 22px; }
.qr .num { font-size: 40px; font-weight: 700; color: var(--navy); margin: 6px 0 2px; }
.qr ol { font-size: 18px; padding-left: 22px; }
.qr .pin { display: inline-block; min-width: 180px; border-bottom: 2px solid var(--ink); }
.qr .cols { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-top: 16px; }
.qr .k { font-size: 15px; columns: 2; }
@media print {
  .top, .noprint, .chat-fab, .chat { display: none !important; }
  body { background: #fff; }
  .wrap { padding: 0; }
  .qr { border-width: 2px; max-width: none; }
}

/* Chat */
.chat-fab { position: fixed; right: 22px; bottom: 22px; background: var(--blue); color: #fff; border: 0; border-radius: 999px; padding: 14px 20px; font-weight: 700; box-shadow: 0 10px 30px rgba(21, 70, 184, .35); display: flex; align-items: center; gap: 10px; z-index: 40; }
.chat { position: fixed; right: 22px; bottom: 22px; width: 390px; max-width: calc(100vw - 24px); height: 580px; max-height: calc(100vh - 40px); background: #fff; border-radius: 18px; box-shadow: 0 20px 60px rgba(15, 29, 58, .28); display: flex; flex-direction: column; overflow: hidden; z-index: 50; border: 1px solid var(--line); }
.chat-h { background: var(--navy); color: #fff; padding: 14px 16px; display: flex; align-items: center; gap: 10px; }
.chat-h b { flex: 1; }
.chat-h small { display: block; color: #c9d3ea; font-weight: 400; }
.chat-h button { background: transparent; border: 0; color: #fff; font-size: 22px; line-height: 1; }
.chat-b { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 10px; background: #f7f9fd; }
.msg { max-width: 88%; padding: 10px 13px; border-radius: 14px; font-size: 14.5px; white-space: pre-wrap; }
.msg.u { align-self: flex-end; background: var(--blue); color: #fff; border-bottom-right-radius: 4px; }
.msg.a { align-self: flex-start; background: #fff; border: 1px solid var(--line); border-bottom-left-radius: 4px; }
.msg .refs { display: flex; flex-direction: column; gap: 6px; margin-top: 8px; white-space: normal; }
.msg .refs a { display: flex; gap: 8px; align-items: center; background: var(--blue-soft); border-radius: 8px; padding: 6px 8px; font-size: 13.5px; color: var(--blue); font-weight: 700; }
.msg .refs img { width: 54px; height: 34px; object-fit: cover; border-radius: 4px; }
.sugs { display: flex; flex-wrap: wrap; gap: 6px; }
.sugs button { background: #fff; border: 1px solid #c8d4f0; color: var(--blue); border-radius: 999px; padding: 6px 10px; font-size: 13px; }
.chat-f { border-top: 1px solid var(--line); padding: 10px; display: flex; gap: 8px; }
.chat-f input { flex: 1; border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; font: inherit; }
.chat-f button { background: var(--blue); color: #fff; border: 0; border-radius: 10px; padding: 0 14px; font-weight: 700; }
.chat-x { text-align: center; font-size: 12.5px; color: var(--muted); padding: 0 12px 10px; }
.typing { color: var(--muted); font-size: 13px; }

/* Login */
.login { min-height: 100vh; display: grid; grid-template-columns: 1.1fr 1fr; }
@media (max-width: 860px) { .login { grid-template-columns: 1fr; } .login .art { display: none; } }
.login .art { background: linear-gradient(150deg, var(--navy), #1d3a7a); color: #fff; padding: 56px; display: flex; flex-direction: column; justify-content: space-between; }
.login .art img { height: 40px; width: auto; align-self: flex-start; }
.login .art h1 { font-size: 36px; line-height: 1.15; margin: 0 0 12px; }
.login .art p { color: #c9d3ea; font-size: 17px; max-width: 460px; }
.login .art ul { color: #dfe6f5; padding-left: 18px; }
.login .form { display: grid; place-items: center; padding: 40px 24px; }
.login form { width: 100%; max-width: 380px; }
.login h2 { margin: 0 0 6px; font-size: 26px; }
.login .sub { color: var(--muted); margin: 0 0 22px; }
.login label { display: block; font-size: 14px; font-weight: 700; margin: 14px 0 6px; }
.login input { width: 100%; padding: 12px 14px; border: 1px solid #cfd6e4; border-radius: 10px; font: inherit; }
.login input:focus { outline: 2px solid #b9c8ec; border-color: var(--blue); }
.login .btn { width: 100%; justify-content: center; margin-top: 20px; padding: 13px; }
.login .err { color: #b42318; font-size: 14px; margin-top: 12px; min-height: 20px; }
.login .help { font-size: 13.5px; color: var(--muted); margin-top: 18px; }
.mlogo { display: none; }
@media (max-width: 860px) { .mlogo { display: block; height: 34px; margin-bottom: 24px; } }
@media (max-width: 560px) { .top .who { display: none; } .top .logo { height: 30px; } .top .out { white-space: nowrap; } }
.clip { margin: 0 0 26px; background: #0f1d3a; border-radius: 14px; overflow: hidden; box-shadow: 0 8px 24px rgba(15,29,58,.12); }
.clip video { display: block; width: 100%; aspect-ratio: 16/9; background: #0f1d3a; }
.clip figcaption { color: #c9d5ee; font-size: 13px; padding: 9px 14px; }
@media print { .clip { display: none; } }
.clip.how { max-width: 900px; margin: 6px 0 30px; }
.msg.h { align-self: flex-start; background: #e8f7f2; border: 1px solid #a9e3d2; border-bottom-left-radius: 4px; }
.msg.h .who { display: block; font-size: 12px; font-weight: 700; color: #0f7a5c; margin-bottom: 4px; }
.cform { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 12px; display: flex; flex-direction: column; gap: 8px; font-size: 14px; }
.cform p { margin: 0; color: var(--muted); font-size: 13.5px; }
.cform textarea { width: 100%; border: 1px solid #c8d4f0; border-radius: 10px; padding: 9px 10px; font: inherit; font-size: 14px; resize: vertical; }
.cform .row { display: flex; gap: 8px; justify-content: flex-end; }
.cform .row button { border-radius: 10px; padding: 8px 14px; font-weight: 700; font-size: 14px; border: 1px solid #c8d4f0; background: #fff; color: var(--blue); }
.cform .row button[type=submit] { background: var(--blue); color: #fff; border-color: var(--blue); }
.cform small { color: var(--muted); font-size: 12px; }
.chat-fab { position: fixed; }
.chat-fab .badge { position: absolute; top: -6px; right: -6px; background: #e5484d; color: #fff; border-radius: 999px; min-width: 22px; height: 22px; font-size: 13px; font-weight: 700; display: grid; place-items: center; padding: 0 6px; }
.chat[hidden], .chat-fab[hidden] { display: none !important; }
