/* ─────────────────────────────────────────────────────────────────────────
   Talon — the account pages: sign up, sign in, checkout, the dashboard and
   the rest of the control plane (control/templates). Loaded by base.html on
   the Talon site only, after base.html's own styles; base.html renders the
   Talon nav, footer and the split sign-in layout when `talon` is set.
   The same tokens as the home page (assets/site.css) and the agent's skin
   (themes/talon/theme.css): warm paper, night graphite, Talon gold.
   ───────────────────────────────────────────────────────────────────────── */

:root {
  color-scheme: light;
  --paper: #faf8f4;
  --paper-2: #f3f0e9;
  --card: #ffffff;
  --ink: #141416;
  --ink-2: #55545a;
  --ink-3: #8b8a86;
  --line: rgba(20, 20, 22, .09);
  --line-2: rgba(20, 20, 22, .16);
  /* base.html calls its accent "green": on Talon it is gold. */
  --green: #8f5a00;
  --green-deep: #6f4500;
  --green-tint: rgba(244, 183, 64, .16);
  --gold: #f4b740;
  --gold-hi: #ffd27a;
  --gold-deep: #e3a42a;
  --gold-tint: rgba(244, 183, 64, .14);
  --gold-line: rgba(201, 138, 18, .32);
  --gold-ink: #8f5a00;
  --ok: #1f9d63;
  --ok-tint: rgba(31, 157, 99, .12);
  --red: #c8412f;
  --red-tint: rgba(200, 65, 47, .08);
  --red-line: rgba(200, 65, 47, .28);
  --red-ink: #9a2f20;
  --dark: #0b0b0d;
  --dark-2: #141417;
  --dark-line: rgba(255, 255, 255, .1);
  --dark-text: #f4f2ed;
  --dark-mut: #a9a6a0;
  --night: #0b0b0d;
  --serif: "Instrument Serif", "Iowan Old Style", Georgia, serif;
  --sans: "Geist", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --mono: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --shadow-sm: 0 1px 2px rgba(40, 30, 10, .05), 0 6px 18px -10px rgba(40, 30, 10, .18);
  --shadow-lg: 0 1px 2px rgba(40, 30, 10, .05), 0 24px 60px -30px rgba(40, 30, 10, .35);
  --nav-bg: rgba(250, 248, 244, .78);
  --btn-bg: #141416;
  --btn-fg: #faf8f4;
  --btn-bg-h: #2a2a2e;
  --sb-track: #faf8f4;
  --ease: cubic-bezier(.2, .7, .1, 1);
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --paper: #0d0d0f;
  --paper-2: #121215;
  --card: #161619;
  --ink: #f4f2ed;
  --ink-2: #b6b3ab;
  --ink-3: #807d76;
  --line: rgba(255, 255, 255, .08);
  --line-2: rgba(255, 255, 255, .15);
  --green: #f6c25c;
  --green-deep: #ffd27a;
  --green-tint: rgba(244, 183, 64, .12);
  --gold-ink: #f6c25c;
  --gold-tint: rgba(244, 183, 64, .1);
  --gold-line: rgba(244, 183, 64, .3);
  --ok: #5fd39a;
  --ok-tint: rgba(95, 211, 154, .12);
  --red: #f0685a;
  --red-tint: rgba(240, 104, 90, .1);
  --red-line: rgba(240, 104, 90, .3);
  --red-ink: #ffb3aa;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .35), 0 8px 20px -12px rgba(0, 0, 0, .6);
  --shadow-lg: 0 1px 2px rgba(0, 0, 0, .35), 0 30px 70px -30px rgba(0, 0, 0, .8);
  --nav-bg: rgba(13, 13, 15, .78);
  --btn-bg: #f4f2ed;
  --btn-fg: #141416;
  --btn-bg-h: #ffffff;
  --sb-track: #0d0d0f;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    color-scheme: dark;
    --paper: #0d0d0f; --paper-2: #121215; --card: #161619;
    --ink: #f4f2ed; --ink-2: #b6b3ab; --ink-3: #807d76;
    --line: rgba(255, 255, 255, .08); --line-2: rgba(255, 255, 255, .15);
    --green: #f6c25c; --green-deep: #ffd27a; --green-tint: rgba(244, 183, 64, .12);
    --gold-ink: #f6c25c; --ok: #5fd39a; --ok-tint: rgba(95, 211, 154, .12);
    --red: #f0685a; --red-tint: rgba(240, 104, 90, .1); --red-line: rgba(240, 104, 90, .3); --red-ink: #ffb3aa;
    --nav-bg: rgba(13, 13, 15, .78); --btn-bg: #f4f2ed; --btn-fg: #141416; --btn-bg-h: #fff; --sb-track: #0d0d0f;
  }
}

body.talon { font-family: var(--sans); letter-spacing: -.006em; -webkit-font-smoothing: antialiased; background: var(--paper); }
body.talon ::selection { background: rgba(244, 183, 64, .32); }
body.talon :focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }

/* ── type ── */
body.talon h1 { font-family: var(--sans); font-weight: 600; letter-spacing: -.045em; line-height: 1; }
body.talon h1.sm { font-size: clamp(34px, 4.4vw, 46px); }
body.talon h1 em, body.talon h2 em { font-family: var(--serif); font-style: italic; font-weight: 400; letter-spacing: -.01em; color: var(--gold-ink); }
body.talon h2 { font-family: var(--sans); font-weight: 600; letter-spacing: -.03em; }
body.talon h3 { font-family: var(--sans); font-weight: 600; letter-spacing: -.02em; }
body.talon .eyebrow { font: 500 12.5px/1 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--gold-ink); }
body.talon .eyebrow::before, body.talon .eyebrow::after { display: none; }
body.talon .lede { color: var(--ink-2); }
body.talon code { font-family: var(--mono); font-size: .9em; padding: 2px 7px; border-radius: 6px; background: var(--gold-tint); color: var(--gold-ink); border: 0; }
body.talon a { color: var(--ink); text-decoration-color: var(--line-2); text-underline-offset: 3px; }
body.talon a:hover { color: var(--gold-ink); }

/* ── nav ── */
.tnav { position: sticky; top: 0; z-index: 40; background: var(--nav-bg); backdrop-filter: saturate(170%) blur(18px); -webkit-backdrop-filter: saturate(170%) blur(18px); box-shadow: 0 1px 0 var(--line); }
.tnav-in { max-width: 1240px; margin: 0 auto; padding: 0 clamp(18px, 4vw, 40px); height: 62px; display: flex; align-items: center; }
.tbrand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none !important; color: var(--ink) !important; font-weight: 650; font-size: 18.5px; letter-spacing: -.03em; }
.tbrand img { border-radius: 7px; box-shadow: 0 2px 8px -3px rgba(0, 0, 0, .4); }
.tnav-end { margin-left: auto; display: flex; align-items: center; gap: 6px; }
.tnav-end .nav-link { padding: 8px 12px; border-radius: 999px; font-size: 14px; font-weight: 500; color: var(--ink-2) !important; text-decoration: none; }
.tnav-end .nav-link:hover { color: var(--ink) !important; background: var(--line); }
.tnav-end .btn-nav { margin-left: 6px; height: 36px; padding: 0 16px; border-radius: 999px; display: inline-flex; align-items: center; font-size: 14px; font-weight: 600; text-decoration: none;
  background: linear-gradient(180deg, #ffc65a, var(--gold) 55%, var(--gold-deep)); color: #1c1405 !important; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .45), 0 6px 16px -8px rgba(244, 183, 64, .8); }
.tnav-end .btn-nav:hover { filter: brightness(1.04); }
body.talon .theme-btn { margin-left: 6px; width: 36px; height: 36px; border-radius: 999px; border: 0; background: transparent; color: var(--ink-2); box-shadow: inset 0 0 0 1px var(--line); }
body.talon .theme-btn:hover { color: var(--ink); background: var(--line); }

/* ── main ── */
body.talon main { padding: clamp(40px, 7vh, 72px) 0 90px; }
body.talon main.hero { background: none; }
body.talon main.hero::before, body.talon main.hero::after { display: none; }
body.talon .wrap { max-width: 1040px; }

/* ── the split sign-in layout ── */
.auth { display: grid; grid-template-columns: minmax(380px, 46%) 1fr; min-height: calc(100vh - 62px); }
.auth-panel { position: relative; overflow: hidden; isolation: isolate; background: var(--night); color: #f4f2ed; display: flex; align-items: center; justify-content: center; padding: 60px clamp(32px, 5vw, 80px); }
.auth-sky { position: absolute; inset: 0; z-index: -1; filter: blur(60px); }
.auth-sky i { position: absolute; border-radius: 50%; }
.auth-sky i:first-child { width: 80%; height: 55%; left: 10%; bottom: -10%; background: radial-gradient(closest-side, rgba(244, 183, 64, .42), transparent); animation: aDrift 18s ease-in-out infinite alternate; }
.auth-sky i:last-child { width: 60%; height: 45%; right: -10%; top: 10%; background: radial-gradient(closest-side, rgba(233, 130, 43, .22), transparent); animation: aDrift 24s ease-in-out infinite alternate-reverse; }
@keyframes aDrift { to { transform: translate(6%, -8%) scale(1.1); } }
.auth-panel-in { max-width: 440px; width: 100%; }
.auth-icon { border-radius: 17px; box-shadow: 0 20px 40px -16px rgba(0, 0, 0, .8), 0 0 50px -10px rgba(244, 183, 64, .5); }
.auth-quote { margin: 34px 0 0; font-weight: 600; font-size: clamp(32px, 3.4vw, 46px); line-height: 1; letter-spacing: -.045em; }
.auth-quote em { display: block; margin-top: 6px; padding-bottom: .12em; font-family: var(--serif); font-style: italic; font-weight: 400; letter-spacing: -.02em; font-size: 1.08em;
  background: linear-gradient(100deg, #fff1cf, #ffd27a 35%, #f4b740 65%, #e9822b); -webkit-background-clip: text; background-clip: text; color: transparent; }
.auth-points { list-style: none; margin: 30px 0 0; padding: 0; display: grid; gap: 12px; color: #c9c6bf; font-size: 15.5px; }
.auth-points li { display: flex; gap: 11px; align-items: center; }
.auth-points li::before { content: ""; width: 18px; height: 18px; flex: none; border-radius: 50%; background: rgba(244, 183, 64, .16) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M6 10.5l2.6 2.6L14.5 7' fill='none' stroke='%23f4b740' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/100%; }
.auth-card { margin-top: 40px; padding: 16px 18px; border-radius: 16px; background: rgba(255, 255, 255, .06); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .1), 0 30px 60px -30px rgba(0, 0, 0, .8); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); animation: aFloat 7s ease-in-out infinite; }
@keyframes aFloat { 50% { transform: translateY(-6px); } }
.auth-card-head { display: flex; align-items: center; gap: 8px; font-size: 13px; }
.auth-card-head img { border-radius: 5px; }
.auth-card-head span { margin-left: auto; font-family: var(--mono); color: #8d8a84; }
.auth-card p { margin: 10px 0 0; font-size: 14.5px; line-height: 1.5; color: #d6d3cc; }
.auth-card p b { color: #fff; }
.auth-main { display: flex; align-items: center; padding: clamp(40px, 7vh, 80px) 0 !important; }
body.talon .auth-main .wrap { width: 100%; max-width: 540px; margin: 0 auto; padding: 0 28px; }
.auth-main .wrap > div[style] { max-width: none !important; }

/* ── cards ── */
body.talon .card { background: var(--card); border: 0; border-radius: 22px; box-shadow: inset 0 0 0 1px var(--line), var(--shadow-sm); padding: clamp(22px, 3vw, 32px); }
body.talon .card.lift:hover { transform: none; box-shadow: inset 0 0 0 1px var(--line-2), var(--shadow-sm); }
body.talon .card.feature { box-shadow: inset 0 0 0 1px var(--line), var(--shadow-lg); }
body.talon .card + .card { margin-top: 16px; }
body.talon .card-head h2 { font-size: 21px; }

/* ── forms ── */
body.talon label, body.talon .form-label { font: 550 14px/1.4 var(--sans); letter-spacing: -.005em; text-transform: none; color: var(--ink); }
body.talon label .opt { font-weight: 400; color: var(--ink-3); }
body.talon input[type=text], body.talon input[type=password], body.talon input[type=email], body.talon select, body.talon textarea {
  height: 48px; padding: 0 15px; border-radius: 13px; border: 0; background: var(--paper); color: var(--ink); font: 400 16px var(--sans);
  box-shadow: inset 0 0 0 1px var(--line-2); transition: box-shadow .2s, background-color .2s;
}
body.talon textarea { height: auto; padding: 12px 15px; }
body.talon input:hover, body.talon select:hover { box-shadow: inset 0 0 0 1px var(--ink-3); }
body.talon input:focus, body.talon select:focus, body.talon textarea:focus { outline: 0; background: var(--card); box-shadow: inset 0 0 0 1.5px var(--gold-deep), 0 0 0 4px rgba(244, 183, 64, .18); }
body.talon input::placeholder { color: var(--ink-3); }
body.talon label.check input { accent-color: var(--gold-deep); }
body.talon .hint { color: var(--ink-3); }

/* ── buttons ── */
body.talon button:not(.theme-btn), body.talon .btn {
  height: 48px; padding: 0 22px; border-radius: 999px; font: 600 15px/1 var(--sans); letter-spacing: -.01em;
  background: var(--btn-bg); color: var(--btn-fg); border: 0; box-shadow: none; transition: transform .2s var(--ease), background-color .2s, box-shadow .2s, filter .2s;
}
body.talon button:not(.theme-btn):hover, body.talon .btn:hover { background: var(--btn-bg-h); transform: none; }
body.talon button:not(.theme-btn):active, body.talon .btn:active { transform: scale(.97); }
body.talon form > .row > button[type=submit]:only-of-type, body.talon .btn-green, body.talon button.btn-green {
  background: linear-gradient(180deg, #ffc65a, var(--gold) 55%, var(--gold-deep)); color: #1c1405;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .45), 0 1px 2px rgba(80, 50, 0, .2), 0 10px 24px -12px rgba(244, 183, 64, .8);
}
body.talon form > .row > button[type=submit]:only-of-type:hover, body.talon .btn-green:hover { background: linear-gradient(180deg, #ffd27a, #f6c04f 55%, var(--gold)); color: #1c1405; }
body.talon .btn-outline, body.talon .btn-ghost, body.talon button.btn-ghost, body.talon button.btn-outline {
  background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1px var(--line-2);
}
body.talon .btn-outline:hover, body.talon .btn-ghost:hover, body.talon button.btn-ghost:hover, body.talon button.btn-outline:hover { background: var(--line); color: var(--ink); }
body.talon .btn-sm, body.talon button.btn-sm { height: 36px; padding: 0 15px; font-size: 13.5px; }
body.talon .link-quiet { color: var(--ink-2); font-size: 14.5px; }
body.talon .link-quiet:hover { color: var(--ink); }

/* ── notes ── */
body.talon .flash { border: 0; border-radius: 14px; box-shadow: inset 0 0 0 1px var(--line); background: var(--card); }
body.talon .flash.ok { background: var(--ok-tint); box-shadow: none; color: var(--ok); }
body.talon .flash.ok b { color: var(--ok); }
body.talon .flash.error { background: var(--red-tint); box-shadow: inset 0 0 0 1px var(--red-line); color: var(--red-ink); }
body.talon .flash.note { background: var(--gold-tint); box-shadow: inset 0 0 0 1px var(--gold-line); }
body.talon .pill { border-radius: 999px; font-weight: 550; }
body.talon .pill.on::before { background: var(--ok); box-shadow: 0 0 0 3px var(--ok-tint); }

/* ── usage meters ── */
body.talon .meter-head .v { font-family: var(--mono); letter-spacing: -.02em; }
body.talon .bar { height: 8px; border-radius: 99px; background: var(--paper-2); box-shadow: inset 0 0 0 1px var(--line); overflow: hidden; }
body.talon .bar > i { border-radius: inherit; background: linear-gradient(90deg, var(--gold-deep), var(--gold) 70%, var(--gold-hi)); }
body.talon .bar.warm > i { background: linear-gradient(90deg, #e9822b, #f4a640); }
body.talon .bar.hot > i { background: linear-gradient(90deg, #c8412f, #e96a4a); }

/* ── the dashboard: the agent's card is the night stage ── */
body.talon.page-dash main > .wrap > .card.feature:first-of-type,
body.talon.page-dash main > .wrap > .flash + .card.feature {
  position: relative; overflow: hidden; isolation: isolate; background: var(--night); color: #f4f2ed;
  box-shadow: 0 0 0 1px rgba(244, 183, 64, .18), 0 40px 80px -40px rgba(40, 30, 10, .55);
  --ink: #f4f2ed; --ink-2: #c9c6bf; --ink-3: #8d8a84; --line: rgba(255, 255, 255, .1); --line-2: rgba(255, 255, 255, .18); --card: #161619;
  --btn-bg: #f4f2ed; --btn-fg: #141416; --btn-bg-h: #fff; --gold-ink: #ffd27a; --green: #ffd27a;
}
body.talon.page-dash main > .wrap > .card.feature:first-of-type::before,
body.talon.page-dash main > .wrap > .flash + .card.feature::before {
  content: ""; position: absolute; z-index: -1; right: -10%; top: -60%; width: 70%; height: 160%;
  background: radial-gradient(closest-side, rgba(244, 183, 64, .22), transparent); filter: blur(20px);
}
body.talon.page-dash .card.feature h1.sm { font-size: clamp(36px, 5vw, 56px); }
@media (min-width: 720px) {
  body.talon.page-dash main > .wrap > .card.feature:first-of-type,
  body.talon.page-dash main > .wrap > .flash + .card.feature {
    background-image: url(/assets/brand/icon-256.png); background-repeat: no-repeat;
    background-size: 128px; background-position: right 56px center; padding-right: 220px;
  }
}
body.talon.page-dash .card.feature a:not(.btn) { color: #ffd27a; }
/* Wide screens: the agent across the top, then two columns, the usage and
   the ideas list on the left, everything smaller stacked on the right. */
body.talon.page-dash main .wrap { max-width: 1120px; }
@media (min-width: 980px) {
  body.talon.page-dash main > .wrap { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 16px; align-items: start; grid-auto-flow: row dense; }
  body.talon.page-dash main > .wrap > * { grid-column: 2; margin: 0 !important; }
  body.talon.page-dash main > .wrap > .card.feature, body.talon.page-dash main > .wrap > .flash,
  body.talon.page-dash main > .wrap > :not(.card) { grid-column: 1 / -1; }
  body.talon.page-dash main > .wrap > #usage,
  body.talon.page-dash main > .wrap > #ideas { grid-column: 1; }
  body.talon.page-dash main > .wrap > #ideas { grid-row: span 4; }
  body.talon.page-dash main > .wrap > :last-child:not(.card) { text-align: center; margin-top: 8px !important; }
}

/* ── footer ── */
.tfoot { border-top: 1px solid var(--line); background: var(--paper); }
.tfoot-in { max-width: 1240px; margin: 0 auto; padding: 28px clamp(18px, 4vw, 40px); display: flex; align-items: center; gap: 28px; flex-wrap: wrap; font-size: 14px; color: var(--ink-3); }
.tfoot .tbrand { font-size: 16px; }
.tfoot nav { display: flex; gap: 18px; flex-wrap: wrap; }
.tfoot nav a { color: var(--ink-2) !important; text-decoration: none; }
.tfoot nav a:hover { color: var(--ink) !important; }
.tfoot-c { margin-left: auto; }

/* ── small screens ── */
@media (max-width: 900px) {
  .auth { grid-template-columns: 1fr; min-height: 0; }
  .auth-panel { padding: 34px 24px 30px; justify-content: flex-start; }
  .auth-icon { width: 48px; height: 48px; border-radius: 12px; }
  .auth-quote { margin-top: 18px; font-size: 30px; }
  .auth-points, .auth-card { display: none; }
  .auth-main { padding: 34px 0 60px !important; }
}
@media (max-width: 560px) {
  .tnav-in { height: 56px; }
  .tnav-end .nav-link { padding: 8px 8px; }
  .tfoot-c { margin-left: 0; }
  body.talon .row { flex-wrap: wrap; }
  body.talon form > .row > button[type=submit] { width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  .auth-sky i, .auth-card { animation: none !important; }
}
