/* App and inner pages: the finalized concept's components (dashboard, admin, system, event, videos,
   legal, login) drawn in the Figma design: black + paper, Source Serif headings, Manrope text. */

:root { --card: #f5f4f0; --line: #dcdad4; --line-2: #e6e4de; --text: #141414; --muted: #6a6a67; }

/* ---------- shared bits ---------- */
.muted { color: var(--muted); }
.small { font-size: 13.5px; }
.empty { color: var(--muted); }
.center { text-align: center; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.draft-label { display: inline-block; font-size: 11px; text-transform: uppercase; letter-spacing: .04em; color: #a8800b; background: #fbf0d0; border-radius: 5px; padding: 1px 7px; vertical-align: middle; }
.demo-tag { display: inline-block; margin-left: 8px; font-size: 10.5px; text-transform: uppercase; letter-spacing: .05em; color: #a8800b; border: 1px solid #e8cf7d; border-radius: 5px; padding: 0 6px; vertical-align: middle; font-family: var(--sans); font-weight: 500; }
.badge { display: inline-block; font-family: var(--sans); font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .03em; border-radius: 6px; padding: 2px 8px; white-space: nowrap; vertical-align: middle; }
.b-green { background: #e1f1e8; color: #2f8a5f; } .b-amber { background: #fbf0d0; color: #a8800b; } .b-red { background: #fde2e1; color: #c9383c; }
.b-blue { background: #e3ecfb; color: #2f6fd8; } .b-grey { background: #e2e1dc; color: #555; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0 12px; }
.tag { font-size: 11.5px; text-transform: uppercase; padding: 2px 8px; border-radius: 5px; background: #e2e1dc; color: #5f5f5c; font-family: var(--sans); font-weight: 500; }
.tag.new, .tag.risk-low { background: #e1f1e8; color: #3e9f73; } .tag.risk-medium { background: #fbf0d0; color: #c9970c; } .tag.risk-high { background: #fde2e1; color: #e5484d; }

/* Buttons inside app pages: compact, black primary, outlined secondary */
.appbody .btn, .pubpage main .btn, dialog .btn { height: 42px; padding: 0 20px; font-size: 14.5px; font-weight: 600; border-radius: 999px; background: #0a0a0a; color: #fff; border: 1px solid #0a0a0a; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 6px; text-decoration: none; }
.appbody .btn:hover, .pubpage main .btn:hover, dialog .btn:hover { background: #262626; }
.appbody .btn.quiet, .pubpage main .btn.quiet, dialog .btn.quiet { background: transparent; color: #141414; border-color: #c9c7c0; }
.appbody .btn.quiet:hover, .pubpage main .btn.quiet:hover, dialog .btn.quiet:hover { background: #f1f0eb; }
.appbody .btn.sm, .pubpage main .btn.sm, dialog .btn.sm { height: 34px; padding: 0 14px; font-size: 13px; }
.appbody .btn.danger, dialog .btn.danger { background: #fde2e1; color: #b3282d; border-color: #fde2e1; }
.appbody .btn[disabled], dialog .btn[disabled] { opacity: .5; pointer-events: none; }
.btn.wide { width: 100%; }

/* ---------- forms ---------- */
.form { display: grid; gap: 14px; }
.form label { display: grid; gap: 6px; align-content: start; font-size: 13px; font-weight: 500; color: #333; }
.form input:not([type=checkbox]), .form select, .form textarea, .filters input, .filters select, .copybox input {
  width: 100%; height: 44px; border: 1px solid #d3d1cb; border-radius: 12px; background: #fbfaf7; padding: 0 13px; font: inherit; font-size: 16px; color: #111; outline: none; transition: border-color .15s, box-shadow .15s; }
.form textarea { height: 110px; padding: 11px 13px; resize: vertical; }
.form input:focus, .form select:focus, .form textarea:focus, .filters input:focus, .filters select:focus { border-color: #888; box-shadow: 0 0 0 4px rgba(0,0,0,.06); }
.form .check, label.check { display: flex; grid-template-columns: none; align-items: flex-start; gap: 10px; font-weight: 400; font-size: 14px; color: #333; line-height: 1.45; cursor: pointer; }
.form .check input, label.check input { -webkit-appearance: none; appearance: none; width: 20px; height: 20px; margin: 0; flex-shrink: 0; border: 1.5px solid #b9b6ae; border-radius: 6px; background: #fbfaf7 center / 12px 12px no-repeat; cursor: pointer; transition: background-color .15s, border-color .15s; }
.form .check input:checked, label.check input:checked { background-color: #0a0a0a; border-color: #0a0a0a; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M2.5 6.2l2.3 2.3 4.7-5' fill='none' stroke='%23fff' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); }
.form .check input:focus-visible, label.check input:focus-visible { outline: none; box-shadow: 0 0 0 4px rgba(0,0,0,.08); border-color: #555; }
.form .check a, label.check a { color: inherit; }
.checks { display: grid; gap: 8px; }
.form fieldset { border: 0; padding: 0; margin: 0; }
.form legend { font-size: 13px; font-weight: 500; color: #333; margin-bottom: 8px; }
.error { color: #c9383c; font-size: 14px; margin: 0; min-height: 0; }
.error:empty { display: none; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.copybox { display: flex; gap: 8px; align-items: center; }
.copybox input { height: 36px; font-size: 13px; }

/* ---------- app shell: sidebar + content ---------- */
body.appbody { background: var(--paper); color: var(--text); }
body.appbody .app { opacity: 0; transition: opacity .3s; }
body.appbody.ready .app { opacity: 1; }
.app { display: grid; grid-template-columns: 250px 1fr; min-height: 100vh; }
.sidebar { position: sticky; top: 0; height: 100vh; background: #0a0a0a; color: #fff; display: flex; flex-direction: column; padding: 18px 14px; gap: 18px; }
.sidebar .brand { display: flex; align-items: center; gap: 9px; text-decoration: none; padding: 4px 8px 10px; }
.sidebar .brand img { height: 26px; width: auto; }
.sidebar .brand span { display: flex; flex-direction: column; line-height: 1.1; }
.sidebar .brand b { font-size: 14.5px; font-weight: 600; } .sidebar .brand small { font-size: 11px; color: #aaa; }
.tabs-nav { display: flex; flex-direction: column; gap: 2px; overflow-y: auto; }
.tab { all: unset; box-sizing: border-box; display: flex; align-items: center; justify-content: space-between; gap: 8px; width: 100%; padding: 9px 12px; border-radius: 10px; color: #b5b5b2; font-size: 14.5px; cursor: pointer; transition: background .15s, color .15s; }
.tab:hover { background: #161616; color: #fff; }
.tab[aria-current="page"] { background: #fff; color: #0a0a0a; font-weight: 600; }
.tab:focus-visible { outline: 2px solid #8fb4ff; }
.count { min-width: 20px; padding: 0 7px; height: 20px; border-radius: 10px; background: #e5484d; color: #fff; font-size: 11.5px; font-weight: 600; display: inline-grid; place-items: center; }
.sidebar .bottom { margin-top: auto; display: grid; gap: 8px; padding: 12px 8px 4px; border-top: 1px solid #1d1d1d; }
.sidebar .bottom .btn.quiet { color: #ddd; border-color: #333; }
.sidebar .bottom .btn.quiet:hover { background: #161616; }
.sidebar .muted { color: #8a8a87; }
.content { padding: 34px clamp(18px, 3.5vw, 48px) 60px; min-width: 0; max-width: 1280px; width: 100%; }
#screen > header { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 22px; }
#screen > header h1 { font-family: var(--serif); font-weight: 500; font-size: clamp(30px, 3.2vw, 42px); letter-spacing: -0.02em; margin: 0; line-height: 1.1; }
#screen > header p { margin: 6px 0 0; color: var(--muted); max-width: 760px; font-size: 15px; }
.header-actions { display: flex; gap: 8px; flex-wrap: wrap; }
h2.group { font-family: var(--serif); font-weight: 500; font-size: 24px; margin: 30px 0 12px; }

/* tiles, panels, lists */
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; margin-bottom: 18px; }
.tile { all: unset; box-sizing: border-box; cursor: pointer; background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 16px 18px; display: grid; gap: 2px; transition: border-color .2s, box-shadow .2s, transform .2s; }
.tile:hover { border-color: #bdbab2; box-shadow: 0 10px 30px rgba(0,0,0,.06); transform: translateY(-1px); }
.tile b { font-family: var(--serif); font-weight: 400; font-size: 36px; line-height: 1.1; }
.tile span { font-size: 13.5px; color: var(--muted); }
.columns { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; align-items: start; }
.panel { background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 20px 22px; }
.content .panel + .panel { margin-top: 0; }
.content > #screen > .panel, .content > #screen > section.panel { margin-bottom: 16px; }
.panel h2 { font-family: var(--serif); font-weight: 500; font-size: 22px; margin: 0 0 12px; }
.panel.tour { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 16px; background: #0a0a0a; color: #fff; border-color: #0a0a0a; }
.panel.tour h2 { margin: 0 0 4px; } .panel.tour .muted { color: #aaa; }
.panel.tour .btn { background: #fff; color: #000; border-color: #fff; }
.list { list-style: none; margin: 0; padding: 0; }
.list li { padding: 11px 0; border-bottom: 1px solid var(--line-2); font-size: 14.5px; }
.list li:last-child { border-bottom: 0; }
.list time, .list .meta { display: block; font-size: 12px; color: var(--muted); margin-bottom: 3px; }
.list strong { font-family: var(--serif); font-weight: 500; font-size: 17px; }
.list p { margin: 3px 0 0; color: #4a4a48; }
.list .tag { font-size: 10px; margin-left: 4px; }
.details { display: grid; grid-template-columns: 150px 1fr; gap: 8px 14px; margin: 0 0 16px; font-size: 14.5px; }
.details dt { color: var(--muted); } .details dd { margin: 0; word-break: break-word; }
.details a { color: inherit; }
.next-step { background: #fff; border: 1px solid var(--line); border-left: 3px solid #0a0a0a; border-radius: 12px; padding: 14px 16px; font-size: 14.5px; }
.next-step a { color: inherit; }

/* agenda */
.agenda { list-style: none; margin: 0; padding: 0; }
.agenda li { border-bottom: 1px solid var(--line-2); }
.agenda li:last-child { border-bottom: 0; }
.agenda a { display: grid; grid-template-columns: auto 1fr auto; gap: 14px; align-items: center; padding: 11px 0; text-decoration: none; color: inherit; }
.agenda a:hover strong { text-decoration: underline; }
.datebox { width: 52px; height: 58px; background: #e6e5e0; border-radius: 8px; display: grid; place-content: center; text-align: center; line-height: 1; }
.datebox b { font-family: var(--serif); font-weight: 400; font-size: 24px; } .datebox span { font-size: 11px; text-transform: uppercase; margin-top: 3px; }
.agenda .what strong { display: block; font-weight: 500; font-size: 15.5px; }
.agenda .meta { font-size: 12.5px; color: var(--muted); }
.agenda .tags { margin: 0; justify-content: flex-end; }

/* system cards inside the app: same card as the homepage */
.appbody .systems, .pubpage .systems { margin-top: 0; }
a.sys.clickable { text-decoration: none; color: inherit; display: flex; flex-direction: column; transition: box-shadow .25s, border-color .25s, transform .25s; }
a.sys.clickable:hover { box-shadow: 0 16px 44px rgba(0,0,0,.08); border-color: #c9c6be; transform: translateY(-2px); }
.sys .cue { font-size: 13px; text-transform: uppercase; font-weight: 600; color: #333; }
.stats-note { font-size: 12.5px; color: var(--muted); margin: 10px 0 0; line-height: 1.5; }
.stats-note.warn { color: #a8800b; }
.stats.key { margin-top: 6px; }

/* admin cards (providers) */
article.sys.clickable { cursor: pointer; padding: 18px 20px; }
article.sys .who { display: flex; gap: 12px; align-items: center; }
.avatar { width: 42px; height: 42px; border-radius: 50%; background: #0a0a0a; color: #fff; display: grid; place-items: center; font-family: var(--serif); font-size: 15px; flex-shrink: 0; }
article.sys h3 { font-size: 22px; margin: 0; }
article.sys .stats { grid-template-columns: repeat(3, 1fr); }
article.sys .stats strong { font-size: 20px; }

/* tables + filters */
.filters { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.filters input[type=search] { flex: 1 1 220px; height: 40px; font-size: 15px; }
.filters select { width: auto; height: 40px; font-size: 14px; padding-right: 30px; }
table.data { width: 100%; border-collapse: separate; border-spacing: 0; background: var(--card); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; font-size: 14.5px; }
table.data th { text-align: left; font-size: 11.5px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); font-weight: 600; background: #efeee9; padding: 11px 14px; }
table.data td { padding: 12px 14px; border-top: 1px solid var(--line-2); vertical-align: top; }
table.data tr[tabindex] { cursor: pointer; }
table.data tbody tr:hover td { background: #faf9f6; }
.metrics { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin: 16px 0; }
.metrics > div { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; display: grid; gap: 2px; }
.metrics span { font-size: 12px; color: var(--muted); } .metrics b { font-family: var(--serif); font-weight: 400; font-size: 24px; } .metrics small { font-size: 12px; color: var(--muted); }

/* dialogs + toasts */
dialog.pop { width: min(720px, 94vw); max-width: none; max-height: 90vh; padding: 0; border: 0; border-radius: 20px; background: var(--paper); color: var(--text); box-shadow: 0 30px 90px rgba(0,0,0,.35); }
dialog.pop.wide { width: min(1120px, 96vw); background: #000; }
dialog.pop.wide header { background: #0a0a0a; color: #fff; } dialog.pop.wide .close { color: #fff; }
dialog.pop.wide .dialog-body { padding: 0; }
dialog::backdrop { background: rgba(0,0,0,.55); backdrop-filter: blur(3px); }
dialog.pop header { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 18px 22px 14px; position: sticky; top: 0; background: inherit; z-index: 1; }
dialog.pop header h2 { font-family: var(--serif); font-weight: 500; font-size: 26px; margin: 0; }
dialog.pop .close { all: unset; cursor: pointer; font-size: 28px; line-height: 1; color: #555; width: 36px; height: 36px; display: grid; place-items: center; border-radius: 50%; }
dialog.pop .close:hover { background: rgba(0,0,0,.06); }
dialog.pop .dialog-body { padding: 4px 22px 22px; overflow: auto; }
dialog.ask { width: min(460px, 92vw); }
.dialog-actions { display: flex; justify-content: flex-end; gap: 8px; flex-wrap: wrap; margin-top: 18px; }
.form.wide { margin-top: 14px; }
#toasts { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); display: grid; gap: 8px; z-index: 1000; pointer-events: none; }
.toast { background: #111; color: #fff; padding: 11px 16px; border-radius: 12px; font-size: 14.5px; box-shadow: 0 10px 30px rgba(0,0,0,.25); animation: fadeUp .3s both; }
.toast.error { background: #b3282d; }

/* lot size result */
.appbody .facts { display: flex; gap: 32px; max-width: none; margin: 0; flex-wrap: wrap; }
.appbody .facts div { border: 0 !important; padding: 0 !important; }
.appbody .facts b { display: block; font-family: var(--serif); font-weight: 400; font-size: 36px; line-height: 1.1; }
.appbody .facts span { font-size: 13px; color: var(--muted); }

/* videos */
.videos { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.vcard { background: var(--card); border: 1px solid var(--line); border-radius: 18px; overflow: hidden; display: flex; flex-direction: column; }
.vcard.clickable { cursor: pointer; transition: box-shadow .25s, transform .25s; }
.vcard.clickable:hover { box-shadow: 0 16px 44px rgba(0,0,0,.1); transform: translateY(-2px); }
.vthumb { aspect-ratio: 16 / 9; background: radial-gradient(400px 200px at 50% 0%, #2a2a2a, #0a0a0a 75%); display: grid; place-items: center; }
.vthumb .play { width: 54px; height: 54px; border-radius: 50%; background: #fff; display: grid; place-items: center; transition: transform .25s; }
.vcard.clickable:hover .play { transform: scale(1.08); }
.vthumb .play svg { width: 22px; height: 22px; fill: #000; margin-left: 3px; }
.vthumb .soon { font-family: var(--mono); font-size: 11px; letter-spacing: .25em; color: #999; text-transform: uppercase; }
.vbody { padding: 14px 16px 18px; }
.vmeta { display: flex; gap: 10px; font-size: 11.5px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.vbody h3 { font-family: var(--serif); font-weight: 500; font-size: 20px; margin: 6px 0 6px; line-height: 1.2; }
.vbody p { margin: 0; color: #4a4a48; font-size: 14px; line-height: 1.5; }

.disclaimer { font-size: 12.5px; color: var(--muted); line-height: 1.6; border-top: 1px solid var(--line); padding-top: 18px; }
.disclaimer a, .legal-links a { color: inherit; }
.legal-links { display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: 12.5px; color: var(--muted); margin-top: 8px; }

/* ---------- public inner pages (system, event, videos, legal, login) ---------- */
body.pubpage { background: var(--paper); color: var(--text); }
.pubpage .hero { min-height: 0; display: block; padding: clamp(44px, 6vw, 80px) 0 clamp(40px, 5vw, 64px); background: radial-gradient(1100px 520px at 50% 0%, #2a2a2a 0%, #141414 45%, #0a0a0a 80%); color: #fff; }
.pubpage .hero h1 { font-size: clamp(36px, 5vw, 64px); text-align: left; line-height: 1.05; margin: 0 0 10px; }
.pubpage .hero .intro { text-align: left; margin: 14px 0 0; max-width: 760px; }
.pubpage .hero .eyebrow { text-align: left; color: #bbb; }
.pubpage .vhero, .pubpage .vhero h1, .pubpage .vhero .intro, .pubpage .vhero .eyebrow { text-align: center; }
.pubpage .vhero .intro { margin: 14px auto 0; }
.pubpage .hero .btn { background: #fff; color: #000; border-color: #fff; }
.pubpage .hero .btn.quiet { background: transparent; color: #fff; border-color: #444; }
.pubpage .hero .btn.quiet:hover { background: #1a1a1a; }
.pubpage .hero .muted, .pubpage .hero .stats-note { color: #a9a9a6; }
.pubpage .hero .stats-note a { color: #fff; }
.pubpage .hero .metrics > div { background: #141414; border-color: #262626; }
.pubpage .hero .metrics span, .pubpage .hero .metrics small { color: #9a9a97; }
.pubpage .hero .tag { background: #1f1f1f; color: #c9c9c6; }
.pubpage .hero .tag.risk-low, .pubpage .hero .tag.new { background: #10301f; color: #6fd3a0; } .pubpage .hero .tag.risk-medium { background: #3a2f0c; color: #f0c64c; } .pubpage .hero .tag.risk-high { background: #3d1515; color: #ff8a8a; }
.pubpage .hero .stats strong { color: #fff; } .pubpage .hero .stats small { color: #9a9a97; }
.crumbs { margin: 0 0 22px; font-size: 13.5px; } .crumbs a { color: #aaa; text-decoration: none; } .crumbs a:hover { color: #fff; }
.pubpage .who { display: flex; gap: 18px; align-items: center; margin-bottom: 8px; }
.pubpage .who h1 { margin: 0 0 8px; }
.avatar.big { width: 68px; height: 68px; font-size: 22px; background: #1c1c1c; border: 1px solid #333; }
.offer { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0; }
.offer span { background: #141414; border: 1px solid #262626; border-radius: 999px; padding: 6px 12px; font-size: 13px; color: #ddd; }
.subnav { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 22px; }
.subnav a { text-decoration: none; color: #ddd; border: 1px solid #333; border-radius: 999px; padding: 7px 14px; font-size: 13.5px; transition: background .2s; }
.subnav a:hover { background: #1a1a1a; color: #fff; }
.when { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 10px; margin: 26px 0 0; max-width: 760px; }
.when > div { background: #141414; border: 1px solid #262626; border-radius: 14px; padding: 12px 14px; font-size: 15px; }
.when span { display: block; font-size: 11.5px; text-transform: uppercase; letter-spacing: .05em; color: #8a8a87; margin-bottom: 4px; }
.pubpage .hero .actions { display: flex; gap: 10px; flex-wrap: wrap; justify-content: flex-start; margin-top: 24px; animation: none; }
.pubpage .hero .actions .btn { min-width: 0; height: 44px; font-size: 14.5px; }

.block { padding: clamp(44px, 6vw, 72px) 0; }
.block.alt { background: #e6e5e0; }
.block h2 { font-family: var(--serif); font-weight: 500; font-size: clamp(26px, 3vw, 36px); letter-spacing: -0.01em; margin: 0 0 10px; }
.block h3 { font-family: var(--serif); font-weight: 500; font-size: 20px; margin: 26px 0 10px; }
.block .lead { text-align: left; margin: 0 0 18px; color: #4a4a48; max-width: 760px; }
.section-head { text-align: center; margin-bottom: 28px; }
.section-head .lead { text-align: center; margin: 12px auto 0; }
.section-head h2 { margin: 0; }
.block.data + .block.data { padding-top: 0; }
.chart { position: relative; margin: 16px 0 6px; outline: none; }
.chart svg { display: block; max-width: 100%; height: auto; }
.chart .grid { stroke: rgba(0,0,0,.08); } .chart .axis { fill: #8a8a87; font-size: 11.5px; font-family: var(--sans); }
.chart .area { fill: rgba(10,10,10,.06); } .chart .line { fill: none; stroke: #0a0a0a; stroke-width: 2; }
.chart .dot { fill: #0a0a0a; } .chart .dot.hover { fill: #fff; stroke: #0a0a0a; stroke-width: 2; }
.chart .cross { stroke: #aaa; stroke-dasharray: 3 3; } .chart .end-label { font-size: 13px; font-weight: 600; fill: #0a0a0a; font-family: var(--sans); }
.chart-tip { position: absolute; transform: translate(-50%, calc(-100% - 12px)); background: #0a0a0a; color: #fff; border-radius: 10px; padding: 7px 10px; font-size: 12.5px; pointer-events: none; white-space: nowrap; }
.chart-tip[data-side="left"] { transform: translate(calc(-100% - 10px), -50%); } .chart-tip[data-side="right"] { transform: translate(10px, -50%); }
.chart-tip b { display: block; font-size: 15px; }
.table-scroll { overflow-x: auto; border: 1px solid var(--line); border-radius: 14px; background: var(--card); margin: 10px 0; }
table.plain { width: 100%; border-collapse: collapse; font-size: 13.5px; white-space: nowrap; }
table.plain th, table.plain td { padding: 9px 12px; text-align: left; border-bottom: 1px solid var(--line-2); }
table.plain thead th { font-size: 11px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); background: #efeee9; }
table.plain tbody th { font-weight: 600; }
table.plain small { display: block; color: var(--muted); font-size: 11px; }
.split { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 28px; }
.cta { background: #0a0a0a; color: #fff; border-radius: 22px; padding: clamp(32px, 5vw, 56px) 24px; text-align: center; }
.cta h2 { color: #fff; } .cta .lead { color: #bbb; text-align: center; margin: 10px auto 22px; }
.cta .btn, .pubpage main .cta .btn { background: #fff; color: #000; border-color: #fff; }
.cta .btn.quiet, .pubpage main .cta .btn.quiet { background: transparent; color: #fff; border-color: #444; }
.pubpage main .cta .btn.quiet:hover { background: #1a1a1a; }
.rewards { list-style: none; margin: 18px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.rewards li { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 16px; display: grid; gap: 4px; }
.rewards b { font-family: var(--serif); font-weight: 500; font-size: 22px; } .rewards span { color: #4a4a48; } .rewards .reached { color: #2f8a5f; font-size: 13px; font-weight: 600; }
.confirmation { background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 24px; }
.confirmation h2, .confirmation h3 { font-family: var(--serif); font-weight: 500; margin: 0 0 8px; }
.centered { max-width: 600px; margin-left: auto; margin-right: auto; }
.confirmation.centered { text-align: center; }
#register .form.centered { background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 22px; }
.narrow { max-width: 760px; margin: 60px auto; padding: 0 var(--pad); }
.narrow h1 { font-family: var(--serif); font-weight: 500; font-size: 36px; }

/* legal */
.legal { max-width: 780px; margin: 0 auto; font-size: 15.5px; line-height: 1.65; color: #2a2a28; }
.legal h2 { font-family: var(--serif); font-weight: 500; font-size: 24px; margin: 30px 0 8px; }
.legal ul { padding-left: 20px; } .legal li { margin: 4px 0; } .legal a { color: inherit; }
.legal .updated { color: var(--muted); font-size: 13.5px; }
.legal .lead-in { font-size: 17px; }
.legal .panel.summary { margin: 18px 0; }
.legal .panel.summary h2 { margin-top: 0; font-size: 20px; }

/* login / apply / activate */
.authpage { min-height: calc(100svh - 60px); background: radial-gradient(1000px 520px at 50% 0%, #232323 0%, #121212 50%, #0a0a0a 85%); padding: clamp(36px, 6vw, 80px) var(--pad) 80px; }
.authcard { max-width: 460px; margin: 0 auto; background: var(--paper); border-radius: 22px; padding: clamp(22px, 4vw, 36px); box-shadow: 0 30px 80px rgba(0,0,0,.35); animation: fadeUp .6s cubic-bezier(.22,1,.36,1) both; }
.authcard.wide { max-width: 720px; }
.authcard .eyebrow { text-align: left; color: #555; }
.authcard h1 { font-family: var(--serif); font-weight: 500; font-size: clamp(30px, 4vw, 40px); margin: 0 0 8px; letter-spacing: -0.02em; }
.authcard .sub { color: #4a4a48; margin: 0 0 22px; font-size: 15px; }
.authcard .small { margin: 14px 0 0; } .authcard .small a { color: inherit; }
.authcard .btn.wide { height: 48px; font-size: 15.5px; }

/* ---------- phones ---------- */
@media (max-width: 900px) {
  .app { grid-template-columns: minmax(0, 1fr); }
  .sidebar { position: sticky; top: 0; height: auto; z-index: 40; padding: 10px 12px 8px; gap: 8px; flex-direction: column; min-width: 0; width: 100%; overflow: hidden; }
  .sidebar .brand { padding: 2px 4px; }
  .tabs-nav { flex-direction: row; overflow-x: auto; gap: 4px; margin: 0 -12px; padding: 0 12px 2px; scrollbar-width: none; }
  .tabs-nav::-webkit-scrollbar { display: none; }
  .tabs-nav { -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 12px, #000 calc(100% - 28px), transparent); mask-image: linear-gradient(90deg, transparent 0, #000 12px, #000 calc(100% - 28px), transparent); }
  .tab { width: auto; flex: 0 0 auto; padding: 7px 12px; font-size: 13.5px; white-space: nowrap; }
  .sidebar .bottom { position: absolute; top: 10px; right: 12px; border: 0; padding: 0; display: flex; gap: 6px; margin: 0; }
  .sidebar .bottom #who, .sidebar .bottom > span { display: none; }
  .sidebar .bottom .btn.sm { height: 30px; padding: 0 10px; font-size: 12px; }
  .content { padding: 22px 16px 48px; }
  .columns, .split, .grid2 { grid-template-columns: 1fr; }
  .tiles { grid-template-columns: 1fr 1fr; gap: 10px; }
  .tile { padding: 12px 14px; } .tile b { font-size: 28px; }
  .panel { padding: 16px; border-radius: 16px; }
  .panel.tour { flex-direction: column; align-items: flex-start; }
  table.data, table.data tbody, table.data tr, table.data td { display: block; width: 100%; }
  table.data thead { display: none; }
  table.data tr { border-top: 1px solid var(--line-2); padding: 8px 0; }
  table.data tr:first-child { border-top: 0; }
  table.data td { border: 0; padding: 3px 14px; display: grid; grid-template-columns: 110px 1fr; gap: 8px; font-size: 14px; }
  table.data td::before { content: attr(data-label); color: var(--muted); font-size: 12px; }
  .details { grid-template-columns: 1fr; gap: 2px; } .details dd { margin-bottom: 8px; }
  dialog.pop { width: 100vw; max-width: 100vw; max-height: 92vh; margin: auto 0 0; border-radius: 20px 20px 0 0; }
  dialog.pop header h2 { font-size: 22px; }
  .pubpage .who { flex-direction: column; align-items: flex-start; gap: 12px; }
  .agenda a { gap: 10px; } .agenda .tags { display: none; }
  .vthumb .play { width: 46px; height: 46px; }
  .when { grid-template-columns: 1fr 1fr; }
  .metrics b { font-size: 21px; }
  .authcard h1 { font-size: 30px; }
}
.count[hidden] { display: none; }
.pubpage .nav .brand, .pubpage .nav .brand b { color: #fff; }
.pubpage .nav .brand small { color: #d8d8d8; }
.split > *, .columns > *, .metrics > * { min-width: 0; }
.table-scroll { max-width: 100%; -webkit-overflow-scrolling: touch; }
@media (max-width: 900px) { .split { grid-template-columns: minmax(0, 1fr); } .columns { grid-template-columns: minmax(0, 1fr); } }

h1, h2, h3 { text-wrap: balance; }
p { text-wrap: pretty; }

/* Number fields: no spinner arrows (they look broken on iPhone); the keypad does the work */
input[type=number] { -moz-appearance: textfield; appearance: textfield; }
input[type=number]::-webkit-inner-spin-button, input[type=number]::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
