/* SyncThesis home: a centred landing page with the sign-in in a dialog. Colours, background and glass come from theme.css. */
*, *::before, *::after { box-sizing: border-box; }
html { overflow-x: hidden; scroll-behavior: smooth; scroll-padding-top: 84px; }
body.home { margin: 0; min-height: 100vh; font-family: 'Inter', system-ui, -apple-system, sans-serif; color: var(--text-primary); overflow-x: hidden; -webkit-font-smoothing: antialiased; }
.skip { position: absolute; left: -9999px; top: 8px; background: var(--accent); color: var(--on-accent); padding: 8px 14px; border-radius: 8px; z-index: 400; font-weight: 600; text-decoration: none; }
.skip:focus { left: 12px; }
h1, h2, h3, p { margin: 0; }
/* theme.css paints a fixed background layer; positioned content sits above it, static content would be covered */
main, .foot { position: relative; z-index: 1; }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 40px; padding: 0 18px; border-radius: 12px; border: 1px solid var(--border-card); background: var(--bg-card); color: var(--text-heading); font: inherit; font-size: 14px; font-weight: 700; text-decoration: none; cursor: pointer; white-space: nowrap; transition: transform .15s, border-color .15s, background .15s; }
.btn:hover { border-color: var(--accent); transform: translateY(-1px); }
.btn.solid { background: var(--accent); border-color: var(--accent); color: var(--on-accent); box-shadow: 0 10px 30px -10px rgba(var(--accent-rgb, 37,99,235), .7); }
.btn.solid:hover { background: var(--accent-hover, var(--accent)); }
.btn.ghost { background: transparent; }
.btn.lg { height: 52px; padding: 0 28px; font-size: 16px; border-radius: 14px; }
.btn.wide { width: 100%; }
.btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.btn:focus-visible, .links a:focus-visible, .signin a:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

/* top bar */
.nav { position: fixed; top: 0; left: 0; right: 0; z-index: 50; padding: 12px clamp(14px, 3vw, 32px); }
.nav-in { max-width: 1480px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 8px 10px 8px 16px; border-radius: 18px; background: var(--bg-nav, var(--bg-card)); border: 1px solid var(--border-card); backdrop-filter: blur(var(--glass-blur)) saturate(140%); -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(140%); }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: inherit; min-width: 0; flex: 1 1 0; }
.brand img { object-fit: contain; flex: none; }
.brand b { font-size: 17px; font-weight: 800; letter-spacing: -.01em; color: var(--text-heading); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.links { display: flex; gap: 4px; flex: none; }
.links a { white-space: nowrap; padding: 8px 14px; border-radius: 10px; font-size: 14px; font-weight: 600; color: var(--text-muted); text-decoration: none; }
.links a:hover { color: var(--text-heading); background: var(--bg-input); }
.nav-act { display: flex; gap: 8px; align-items: center; flex: none; }

/* hero */
.hero { position: relative; overflow-x: clip; max-width: 1080px; margin: 0 auto; padding: 150px clamp(18px, 4vw, 40px) 70px; text-align: center; }
.orb { position: absolute; border-radius: 50%; filter: blur(70px); opacity: .5; pointer-events: none; z-index: -1; animation: float 14s ease-in-out infinite; }
.o1 { width: 420px; height: 420px; left: -8%; top: 40px; background: rgba(var(--accent-rgb, 59,130,246), .35); }
.o2 { width: 360px; height: 360px; right: -6%; top: 220px; background: rgba(168,85,247,.28); animation-delay: -6s; }
@keyframes float { 0%, 100% { transform: translate(0, 0); } 50% { transform: translate(26px, -30px); } }
.chip { display: inline-flex; align-items: center; gap: 10px; padding: 7px 16px; border-radius: 99px; font-size: 13px; font-weight: 600; color: var(--text-secondary); background: var(--bg-card); border: 1px solid var(--border-card); }
.pulse { width: 8px; height: 8px; border-radius: 50%; background: #34d399; box-shadow: 0 0 0 0 rgba(52,211,153,.6); animation: pulse 2s infinite; }
@keyframes pulse { 70% { box-shadow: 0 0 0 10px rgba(52,211,153,0); } 100% { box-shadow: 0 0 0 0 rgba(52,211,153,0); } }
.hero h1 { margin-top: 26px; font-size: clamp(40px, 7.4vw, 84px); line-height: 1.02; font-weight: 900; letter-spacing: -.04em; color: var(--text-heading); }
.swap { display: inline-block; position: relative; vertical-align: bottom; overflow: hidden; height: 1.18em; padding-bottom: .06em; }
.swap span { display: inline-block; white-space: nowrap; animation: rise .55s cubic-bezier(.2,.8,.2,1); padding-right: .06em; color: var(--text-accent); }
.swap span.out { animation: fall .35s ease-in forwards; }
@keyframes rise { from { transform: translateY(100%); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes fall { to { transform: translateY(-100%); opacity: 0; } }
.sub { max-width: 40rem; margin: 26px auto 0; font-size: clamp(16px, 2vw, 19px); line-height: 1.6; color: var(--text-muted); font-weight: 500; }
.cta { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin-top: 34px; }

/* journey rail */
.rail { position: relative; max-width: 860px; margin: 70px auto 0; }
.rail .track { position: absolute; left: 6%; right: 6%; top: 21px; height: 2px; background: var(--border-card); border-radius: 2px; overflow: hidden; }
.dotrun { position: absolute; top: -2px; left: -10%; width: 90px; height: 6px; border-radius: 6px; background: linear-gradient(90deg, transparent, var(--text-accent), transparent); animation: runrail 4.2s linear infinite; }
@keyframes runrail { to { left: 110%; } }
.rail ol { position: relative; display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; margin: 0; padding: 0; list-style: none; }
.rail li { display: flex; flex-direction: column; align-items: center; gap: 10px; font-size: 12.5px; font-weight: 700; color: var(--text-muted); }
.rail li b { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 50%; font-size: 16px; font-weight: 800; color: var(--c); background: color-mix(in srgb, var(--c) 16%, var(--bg-base, #0a0f1c)); border: 2px solid color-mix(in srgb, var(--c) 55%, transparent); animation: beat 3.6s ease-in-out infinite; }
.rail li:nth-child(2) b { animation-delay: .5s; } .rail li:nth-child(3) b { animation-delay: 1s; } .rail li:nth-child(4) b { animation-delay: 1.5s; } .rail li:nth-child(5) b { animation-delay: 2s; }
.rail li b svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
@keyframes beat { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.1); } }

/* sections */
.band { max-width: 1180px; margin: 0 auto; padding: 80px clamp(18px, 4vw, 40px) 20px; }
.over { text-align: center; font-size: 12.5px; font-weight: 800; letter-spacing: .2em; text-transform: uppercase; color: var(--text-accent); }
.band > h2 { text-align: center; margin: 12px auto 44px; max-width: 24ch; font-size: clamp(28px, 4.4vw, 46px); line-height: 1.12; font-weight: 800; letter-spacing: -.03em; color: var(--text-heading); }

/* bento */
.bento { display: grid; grid-template-columns: repeat(6, 1fr); gap: 16px; }
.tile { position: relative; overflow: hidden; padding: 24px; border-radius: 24px; background: var(--bg-card); border: 1px solid var(--border-card); display: flex; flex-direction: column; gap: 8px; min-width: 0; transition: transform .25s, border-color .25s; }
.tile:hover { transform: translateY(-4px); border-color: color-mix(in srgb, var(--text-accent) 50%, var(--border-card)); }
:root[data-glass="on"]:not([data-skin="light"]) .tile, :root[data-glass="on"]:not([data-skin="light"]) .panel { backdrop-filter: blur(var(--glass-blur)) saturate(135%); -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(135%); }
.t-case { grid-column: span 3; } .t-eth { grid-column: span 3; } .t-score { grid-column: span 2; } .t-acad { grid-column: span 2; } .t-hub { grid-column: span 2; } .t-rep { grid-column: span 6; flex-direction: row; align-items: center; gap: 18px; flex-wrap: wrap; }
.t-rep h3 { white-space: nowrap; } .t-rep p { flex: 1; min-width: 240px; }
.ic { width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; color: var(--c); background: color-mix(in srgb, var(--c) 16%, transparent); border: 1px solid color-mix(in srgb, var(--c) 34%, transparent); flex: none; }
.ic svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.tile h3 { margin-top: 6px; font-size: 19px; font-weight: 800; letter-spacing: -.01em; color: var(--text-heading); }
.tile p { font-size: 14.5px; line-height: 1.55; color: var(--text-muted); }
.mini { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 8px; }
.mini li { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 12px; font-size: 13.5px; font-weight: 600; background: var(--bg-input); color: var(--text-primary); }
.mini i { width: 9px; height: 9px; border-radius: 50%; flex: none; } .mini em { margin-left: auto; font-style: normal; font-size: 12px; font-weight: 700; }
.ok { color: #22c55e; } .no { color: #f87171; } .wt { color: #f59e0b; } i.ok { background: #22c55e; } i.no { background: #f87171; } i.wt { background: #f59e0b; }
.stages { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; } .stages .s { padding: 6px 12px; border-radius: 99px; font-size: 12.5px; font-weight: 700; background: var(--bg-input); }
.stages .s.ok { background: rgba(34,197,94,.15); } .stages .s.wt { background: rgba(245,158,11,.16); }
.cert { margin-top: 10px; display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 12px 14px; border-radius: 14px; border: 1px dashed var(--border-input); font-size: 13px; color: var(--text-muted); }
.cert b { font-family: ui-monospace, Menlo, monospace; color: var(--text-accent); } .cert span { display: inline-flex; align-items: center; gap: 8px; color: #22c55e; font-weight: 700; }
.qr { width: 26px; height: 26px; border-radius: 4px; background: conic-gradient(var(--text-heading) 25%, transparent 0 50%, var(--text-heading) 0 75%, transparent 0) 0 0 / 8px 8px; opacity: .85; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 12px; } .chips span { padding: 5px 12px; border-radius: 99px; font-size: 12.5px; font-weight: 700; background: var(--bg-input); color: var(--text-secondary); }
.bars { display: grid; gap: 8px; margin-top: 14px; } .bars span { height: 10px; border-radius: 99px; background: var(--bg-input); position: relative; overflow: hidden; }
.bars span::after { content: ""; position: absolute; inset: 0 auto 0 0; width: var(--w); border-radius: 99px; background: linear-gradient(90deg, #34d399, #38bdf8); transform-origin: left; animation: grow 2.4s ease-out both; }
@keyframes grow { from { transform: scaleX(0); } }
.ring { position: relative; width: 92px; height: 92px; margin-top: 10px; } .ring svg { width: 100%; height: 100%; transform: rotate(-90deg); fill: none; stroke-width: 4; }
.ring circle { stroke: var(--bg-input); } .ring .v { stroke: #fbbf24; stroke-linecap: round; stroke-dasharray: 94.25; stroke-dashoffset: 30; animation: dash 2.4s ease-out both; }
@keyframes dash { from { stroke-dashoffset: 94.25; } }
.ring b { position: absolute; inset: 0; display: grid; place-items: center; font-size: 18px; color: var(--text-heading); }

/* academy */
.acad { display: grid; grid-template-columns: 1.05fr 1fr; gap: 28px; align-items: center; padding: 34px; border-radius: 30px; background: linear-gradient(135deg, rgba(251,191,36,.10), rgba(var(--accent-rgb, 59,130,246), .10)); border: 1px solid var(--border-card); }
.acad-copy > p { font-size: 16px; line-height: 1.65; color: var(--text-muted); }
.ticks { list-style: none; margin: 18px 0 0; padding: 0; display: grid; gap: 10px; }
.ticks li { position: relative; padding-left: 28px; font-size: 14.5px; line-height: 1.5; color: var(--text-muted); } .ticks li b { color: var(--text-heading); }
.ticks li::before { content: ""; position: absolute; left: 0; top: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fbbf24 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231b1500' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12l5 5 9-10'/%3E%3C/svg%3E") center / 11px no-repeat; }
.cta.left { justify-content: flex-start; margin-top: 24px; }
.levels { display: grid; gap: 12px; }
.lv { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border-radius: 18px; background: var(--bg-card); border: 1px solid var(--border-card); }
.lv .n { flex: none; width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; font-weight: 800; background: var(--bg-input); color: var(--text-muted); }
.lv > div { flex: 1; min-width: 0; } .lv b { display: block; font-size: 15px; color: var(--text-heading); } .lv small { font-size: 12.5px; color: var(--text-muted); }
.lv.done .n { background: rgba(34,197,94,.18); color: #22c55e; } .lv.now { border-color: #fbbf24; } .lv.now .n { background: #fbbf24; color: #1b1500; } .lv.lock { opacity: .62; }
.pb { display: block; height: 6px; border-radius: 99px; margin-top: 8px; background: var(--bg-input); overflow: hidden; } .pb span { display: block; height: 100%; width: var(--w); background: #fbbf24; border-radius: 99px; animation: grow 2.4s ease-out both; transform-origin: left; }
.lv i { flex: none; width: 22px; height: 22px; background-position: center; background-repeat: no-repeat; background-size: 100%; }
.chk { border-radius: 50%; background-color: #22c55e; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 12l4 4 8-9'/%3E%3C/svg%3E"); background-size: 70%; }
.lk { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='5' y='11' width='14' height='9' rx='2'/%3E%3Cpath d='M8 11V8a4 4 0 0 1 8 0v3'/%3E%3C/svg%3E"); }

/* flow */
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; counter-reset: s; }
.steps li { position: relative; padding: 26px 22px 22px; border-radius: 22px; background: var(--bg-card); border: 1px solid var(--border-card); }
.steps li b { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 12px; margin-bottom: 14px; font-weight: 800; color: var(--on-accent); background: var(--accent); }
.steps li:not(:last-child)::after { content: ""; position: absolute; right: -14px; top: 44px; width: 12px; height: 12px; border-top: 2px solid var(--text-accent); border-right: 2px solid var(--text-accent); transform: rotate(45deg); opacity: .6; z-index: 2; }
.steps h3 { font-size: 18px; font-weight: 800; color: var(--text-heading); margin-bottom: 6px; } .steps p { font-size: 14px; line-height: 1.55; color: var(--text-muted); }

/* people */
.people { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 14px; }
.people article { padding: 22px; border-radius: 20px; background: var(--bg-card); border: 1px solid var(--border-card); border-top: 3px solid var(--text-accent); }
.people article:nth-child(2) { border-top-color: #34d399; } .people article:nth-child(3) { border-top-color: #fbbf24; } .people article:nth-child(4) { border-top-color: #a78bfa; } .people article:nth-child(5) { border-top-color: #f472b6; }
.people h3 { font-size: 17px; font-weight: 800; margin-bottom: 6px; color: var(--text-heading); } .people p { font-size: 14px; line-height: 1.55; color: var(--text-muted); }

.final { max-width: 820px; margin: 90px auto 0; padding: 56px clamp(20px, 4vw, 48px); text-align: center; border-radius: 32px; background: linear-gradient(135deg, rgba(var(--accent-rgb, 59,130,246), .22), rgba(168,85,247,.16)); border: 1px solid var(--border-card); }
.final h2 { font-size: clamp(30px, 5vw, 48px); font-weight: 900; letter-spacing: -.03em; color: var(--text-heading); } .final p { margin-top: 10px; color: var(--text-muted); font-size: 16px; }
.foot { max-width: 1180px; margin: 60px auto 0; padding: 24px clamp(18px, 4vw, 40px) 36px; display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; font-size: 13px; color: var(--text-faint); border-top: 1px solid var(--border-divider); }

/* sign-in dialog */
.signin { border: 0; padding: 0; background: transparent; color: var(--text-primary); width: min(440px, calc(100vw - 24px)); max-height: calc(100dvh - 24px); overflow: visible; }
.signin::backdrop { background: rgba(4,8,20,.62); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.signin[open] .panel { animation: pop .28s cubic-bezier(.2,.9,.3,1.1); }
@keyframes pop { from { opacity: 0; transform: translateY(18px) scale(.97); } }
.panel { position: relative; padding: 34px 32px 28px; border-radius: 26px; background: var(--bg-modal, var(--bg-card)); border: 1px solid var(--border-card); box-shadow: var(--card-shadow, 0 30px 80px rgba(0,0,0,.5)); max-height: calc(100dvh - 24px); overflow: auto; }
.x { position: absolute; right: 14px; top: 12px; width: 34px; height: 34px; border-radius: 10px; border: 0; background: none; font-size: 24px; line-height: 1; color: var(--text-muted); cursor: pointer; } .x:hover { background: var(--bg-input); color: var(--text-heading); }
.si-logo { object-fit: contain; display: block; margin-bottom: 14px; }
.panel h2 { font-size: 26px; font-weight: 800; letter-spacing: -.02em; color: var(--text-heading); } .si-sub { margin: 6px 0 22px; font-size: 14.5px; color: var(--text-muted); }
.si-msg { margin: 0 0 16px; padding: 11px 14px; border-radius: 12px; font-size: 13.5px; font-weight: 600; line-height: 1.45; background: rgba(239,68,68,.14); border: 1px solid rgba(239,68,68,.45); color: #fca5a5; } .si-msg.ok { background: rgba(34,197,94,.14); border-color: rgba(34,197,94,.45); color: #86efac; } .si-msg.info { background: var(--accent-soft); border-color: var(--border-input); color: var(--text-primary); } .si-msg.warn { background: rgba(245,158,11,.14); border-color: rgba(245,158,11,.45); color: #fcd34d; }
:root[data-skin="light"] .si-msg { color: #b91c1c; } :root[data-skin="light"] .si-msg.ok { color: #166534; } :root[data-skin="light"] .si-msg.warn { color: #92400e; }
.field { margin-bottom: 16px; } .field label { display: block; margin-bottom: 7px; font-size: 13px; font-weight: 700; color: var(--text-secondary); }
.label-row { display: flex; justify-content: space-between; align-items: baseline; } .forgot, .alt a { font-size: 13px; font-weight: 600; color: var(--text-accent); text-decoration: none; } .forgot:hover, .alt a:hover { text-decoration: underline; }
.field input[type=email], .field input[type=password], .field input[type=text] { width: 100%; height: 48px; padding: 0 14px; border-radius: 12px; border: 1px solid var(--border-input); background: var(--bg-input); color: var(--text-primary); font: inherit; font-size: 15px; }
.field input:focus { outline: 2px solid var(--accent); outline-offset: 0; border-color: transparent; }
.pw { position: relative; } .pw input { padding-right: 70px !important; } .pw button { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); height: 32px; padding: 0 10px; border: 0; border-radius: 8px; background: none; color: var(--text-muted); font: inherit; font-size: 13px; font-weight: 700; cursor: pointer; } .pw button:hover { color: var(--text-heading); background: var(--bg-input); }
.remember { display: flex; align-items: center; gap: 10px; margin: 2px 0 20px; font-size: 13.5px; color: var(--text-muted); cursor: pointer; } .remember input { width: 17px; height: 17px; accent-color: var(--accent); }
.alt { margin-top: 18px; text-align: center; font-size: 13.5px; color: var(--text-muted); }
#go[disabled] { opacity: .7; cursor: default; transform: none; }

/* the right-hand controls are wide (theme and glass switches), so the section links give way early and a long school name keeps its room */
@media (max-width: 1560px) { .links { display: none; } }
@media (max-width: 1180px) { .nav-act .ghost { display: none; } }
@media (max-width: 960px) {
  .acad { grid-template-columns: 1fr; padding: 24px; }
  .t-case, .t-eth { grid-column: span 6; } .t-score, .t-acad, .t-hub { grid-column: span 2; }
  .steps { grid-template-columns: repeat(2, 1fr); } .steps li::after { display: none; }
}
@media (max-width: 640px) {
  .nav-act .ghost { display: none; } .nav-in { padding: 6px 8px 6px 12px; gap: 8px; } .brand { flex: 1 1 auto; } .brand b { overflow: hidden; text-overflow: ellipsis; font-size: 16px; } .nav-act { flex: none; } .nav-act .btn { height: 38px; padding: 0 14px; }
  .hero { padding-top: 120px; padding-bottom: 40px; }
  .rail { margin-top: 50px; } .rail ol { grid-template-columns: repeat(5, minmax(0, 1fr)); } .rail li { font-size: 10.5px; text-align: center; } .rail li b { width: 36px; height: 36px; font-size: 14px; } .rail .track { top: 17px; }
  .t-score, .t-acad, .t-hub { grid-column: span 6; } .t-rep h3 { white-space: normal; }
  .steps { grid-template-columns: 1fr; }
  .band { padding-top: 56px; } .final { margin-top: 56px; border-radius: 24px; }
  .signin { width: 100vw; max-width: 100vw; margin: auto 0 0; } .panel { border-radius: 26px 26px 0 0; padding: 28px 22px 26px; }
  .cta .btn.lg { flex: 1 1 100%; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } html { scroll-behavior: auto; } }
