/* gift-nifty.io — design tokens
   Night indigo for the trading night, saffron for the 9:15 dawn. */
:root {
  --night: #12142C;
  --night-2: #1C1F3F;
  --night-3: #2B2F5A;
  --night-line: #34396A;
  --mist: #F3F4F9;
  --paper: #FFFFFF;
  --ink: #1B1D36;
  --ink-2: #4B4F70;
  --ink-3: #6E7293;
  --line: #D9DCE8;
  --sun: #EE9B2F;
  --sun-soft: #FCE7C8;
  --sun-text: #9A5A0C;
  --jade: #16916A;
  --rose: #D2434F;
  --on-night: #E9EAF6;
  --on-night-2: #A9ADD2;

  --f-cond: "IBM Plex Sans Condensed", "IBM Plex Sans", "Arial Narrow", system-ui, sans-serif;
  --f-body: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --f-deva: "IBM Plex Sans Devanagari", "IBM Plex Sans", "Noto Sans Devanagari", system-ui, sans-serif;

  --r-sm: 6px;
  --r-md: 10px;
  --r-lg: 18px;
  --wrap: 1180px;
  --rail: 300px;
  --shadow-pop: 0 24px 60px -20px rgba(18, 20, 44, .45);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 88px; }
body {
  margin: 0;
  font-family: var(--f-body);
  font-size: 1.0625rem;
  line-height: 1.62;
  color: var(--ink);
  background: var(--mist);
  text-rendering: optimizeLegibility;
}
html[lang="hi-IN"] body, [lang="hi"] { font-family: var(--f-deva); line-height: 1.75; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--night-3); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--ink); text-decoration-color: var(--sun); text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--sun); outline-offset: 2px; border-radius: 3px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--sun); color: var(--night); padding: 8px 14px; z-index: 100; border-radius: var(--r-sm); }
.skip:focus { left: 8px; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }
[hidden] { display: none !important; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  font: 600 .98rem/1 var(--f-body);
  padding: .85em 1.25em; border-radius: var(--r-sm);
  border: 1.5px solid transparent; cursor: pointer; text-decoration: none;
  transition: background-color .15s, color .15s, border-color .15s, transform .15s;
  white-space: nowrap;
}
.btn svg { width: 1.15em; height: 1.15em; flex: none; }
.btn--sun { background: var(--sun); color: var(--night); }
.btn--sun:hover { background: #F5AE4E; color: var(--night); }
.btn--sun:active { transform: translateY(1px); }
.btn--gift { background: transparent; color: var(--on-night); border-color: var(--sun); }
.btn--gift:hover { background: var(--sun); color: var(--night); }
.btn--ghost-light { background: transparent; color: var(--on-night); border-color: var(--night-line); }
.btn--ghost-light:hover { border-color: var(--on-night-2); color: #fff; }
.btn--line { background: var(--paper); color: var(--ink); border-color: var(--line); }
.btn--line:hover { border-color: var(--ink-3); color: var(--ink); }
.linkish { background: none; border: 0; padding: 0; font: inherit; color: var(--sun); cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }

/* ---------- Header ---------- */
.site-header { position: sticky; top: 0; z-index: 40; background: var(--night); color: var(--on-night); border-bottom: 1px solid var(--night-line); }
.site-header__inner { display: flex; align-items: center; gap: 24px; min-height: 64px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; }
.brand:hover { color: #fff; }
.brand__mark { width: 30px; height: 30px; color: var(--night); }
.brand__ground { fill: var(--night); }
.brand__word { font: 700 1.35rem/1 var(--f-cond); letter-spacing: -.01em; }
.brand__tld { color: var(--sun); }
.site-nav { display: flex; align-items: center; gap: 20px; margin-left: auto; }
.site-nav ul { display: flex; gap: 4px; list-style: none; margin: 0; padding: 0; }
.site-nav a { color: var(--on-night-2); text-decoration: none; font-weight: 500; font-size: .95rem; padding: 8px 10px; border-radius: var(--r-sm); }
.site-nav a:hover, .site-nav a[aria-current="page"] { color: #fff; }
.site-nav a[aria-current="page"] { box-shadow: inset 0 -2px 0 var(--sun); border-radius: 0; }
.site-nav .btn { padding: .65em 1em; font-size: .92rem; }
.nav-toggle { display: none; margin-left: auto; width: 44px; height: 44px; background: none; border: 1px solid var(--night-line); border-radius: var(--r-sm); cursor: pointer; position: relative; }
.nav-toggle__bar, .nav-toggle__bar::before, .nav-toggle__bar::after { position: absolute; left: 11px; right: 11px; height: 2px; background: var(--on-night); content: ""; transition: transform .2s; }
.nav-toggle__bar { top: 21px; }
.nav-toggle__bar::before { left: 0; right: 0; top: -7px; }
.nav-toggle__bar::after { left: 0; right: 0; top: 7px; }
.nav-toggle[aria-expanded="true"] .nav-toggle__bar { background: transparent; }
.nav-toggle[aria-expanded="true"] .nav-toggle__bar::before { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle__bar::after { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 960px) {
  .nav-toggle { display: block; }
  .site-nav { display: none; position: absolute; left: 0; right: 0; top: 64px; background: var(--night); border-bottom: 1px solid var(--night-line); flex-direction: column; align-items: stretch; padding: 8px 20px 20px; gap: 12px; }
  .site-nav.is-open { display: flex; }
  .site-nav ul { flex-direction: column; }
  .site-nav a { display: block; padding: 12px 4px; font-size: 1.05rem; border-bottom: 1px solid var(--night-2); }
  .site-nav a[aria-current="page"] { box-shadow: inset 3px 0 0 var(--sun); padding-left: 12px; }
}

/* ---------- Home hero: the trading night ---------- */
.night {
  background: var(--night); color: var(--on-night);
  position: relative; padding: 48px 0 56px;
  border-bottom: 3px solid transparent;
  border-image: linear-gradient(90deg, var(--night-3) 0%, var(--night-3) 38%, var(--sun) 39%, var(--sun) 64%, var(--night-3) 65%) 1;
}
.night__top { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 40px; align-items: end; }
.night__title { font: 700 clamp(2.6rem, 6.2vw, 4.75rem)/.95 var(--f-cond); letter-spacing: -.02em; margin: 0 0 18px; color: #fff; }
.night__lede { color: var(--on-night-2); font-size: 1.1rem; max-width: 46ch; margin: 0; }
.status { border-left: 3px solid var(--sun); padding: 4px 0 4px 20px; }
.status__now { font: 600 1.6rem/1.2 var(--f-cond); color: #fff; margin: 0 0 6px; }
.status__now .dot { margin-right: 10px; vertical-align: .15em; }
.status__line { margin: 0; color: var(--on-night-2); }
.status__line strong { color: var(--on-night); font-weight: 600; }
.status__count { display: flex; gap: 28px; margin-top: 18px; }
.status__count div { display: flex; flex-direction: column; }
.status__count b { font: 700 2.1rem/1 var(--f-cond); color: #fff; letter-spacing: -.01em; }
.status__count span { color: var(--on-night-2); font-size: .85rem; margin-top: 4px; }
.night__note { margin: 18px 0 0; color: var(--on-night-2); font-size: .85rem; }
.dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: var(--on-night-2); flex: none; }
.dot.is-open { background: var(--jade); box-shadow: 0 0 0 4px rgba(22, 145, 106, .25); animation: pulse 2.4s ease-in-out infinite; }
.dot.is-pre { background: var(--sun); }
.dot.is-closed { background: var(--rose); }
@keyframes pulse { 50% { box-shadow: 0 0 0 7px rgba(22, 145, 106, 0); } }

/* timeline */
.timeline { --lab: 136px; position: relative; margin-top: 40px; padding-bottom: 28px; }
.timeline__row { display: grid; grid-template-columns: 120px 1fr; align-items: center; gap: 16px; margin-bottom: 10px; }
.timeline__label { margin: 0; font: 600 .95rem/1.2 var(--f-cond); color: #fff; }
.timeline__label span { display: block; font: 400 .78rem/1.3 var(--f-body); color: var(--on-night-2); }
.timeline__track { position: relative; height: 34px; background: repeating-linear-gradient(90deg, var(--night-2) 0 calc(100% / 24 - 1px), var(--night-line) calc(100% / 24 - 1px) calc(100% / 24)); border-radius: 4px; overflow: hidden; }
.seg { position: absolute; top: 0; bottom: 0; }
.seg--s1, .seg--s2 { background: linear-gradient(180deg, #3F4486, #343874); }
.seg--s1 { background: linear-gradient(180deg, #4A4F99, #3D4285); }
.seg--pre { background: var(--sun); opacity: .85; }
.seg--nse { background: var(--sun); }
.seg-name { position: absolute; top: 0; bottom: 0; display: flex; align-items: center; padding-left: 10px; font-size: .78rem; font-weight: 600; color: #fff; white-space: nowrap; overflow: hidden; pointer-events: none; }
.seg-name--dark { color: var(--night); }
.timeline__axis { position: relative; margin-left: var(--lab); height: 18px; margin-top: 6px; }
.timeline__axis span { position: absolute; transform: translateX(-50%); font-size: .75rem; color: var(--on-night-2); white-space: nowrap; }
.timeline__axis span:first-child { transform: none; }
.timeline__axis span:last-child { transform: translateX(-100%); }
.timeline__now { position: absolute; top: -8px; bottom: 22px; width: 2px; background: #fff; left: calc(var(--lab) + (100% - var(--lab)) * var(--p, 0)); pointer-events: none; }
.timeline__now::before { content: ""; position: absolute; top: -4px; left: -5px; width: 12px; height: 12px; border-radius: 50%; background: #fff; }
.timeline__now-label { position: absolute; top: -32px; transform: translateX(-50%); background: #fff; color: var(--night); font: 600 .78rem/1 var(--f-body); padding: 5px 8px; border-radius: 4px; white-space: nowrap; }

@media (max-width: 860px) {
  .night { padding: 32px 0 40px; }
  .night__top { grid-template-columns: 1fr; gap: 28px; }
  .timeline__row { grid-template-columns: 1fr; gap: 6px; }
  .timeline { --lab: 0px; }
  .timeline__now { top: 18px; bottom: 22px; }
  .timeline__now-label { display: none; }
  .seg-name { font-size: .7rem; padding-left: 6px; }
  .timeline__axis span:nth-child(even) { display: none; }
}

/* light variant of the timeline (timings page) */
.timeline-card { background: var(--night); border-radius: var(--r-md); padding: 44px 22px 10px; margin: 28px 0; color: var(--on-night); }
.timeline-card .timeline { margin-top: 0; }
@media (min-width: 861px) { .timeline-card .timeline { --lab: 116px; } .timeline-card .timeline__row { grid-template-columns: 100px 1fr; } }

/* ---------- Home chart + quick tools ---------- */
.board { padding: 40px 0 8px; }
.board__grid { display: grid; grid-template-columns: minmax(0, 1fr) var(--rail); gap: 32px; align-items: start; }
.panel { background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-md); }
.chart-panel__head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.chart-panel__title { font: 700 1.25rem/1.2 var(--f-cond); margin: 0; }
.chart-panel__meta { margin: 0; color: var(--ink-3); font-size: .85rem; }
.chart-panel__body { height: 520px; position: relative; }
.chart-panel__body .chart-wait { position: absolute; inset: 0; display: grid; place-items: center; color: var(--ink-3); font-size: .95rem; padding: 20px; text-align: center; }
.chart-panel__foot { padding: 12px 20px; border-top: 1px solid var(--line); font-size: .85rem; color: var(--ink-3); display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
@media (max-width: 1023px) { .board__grid { grid-template-columns: 1fr; } }
@media (max-width: 640px) { .chart-panel__body { height: 400px; } }

/* ---------- Page head (inner pages) ---------- */
.page-head { background: var(--night); color: var(--on-night); padding: 28px 0 40px; }
.page-head__title { font: 700 clamp(2.2rem, 5vw, 3.6rem)/1 var(--f-cond); letter-spacing: -.015em; margin: 14px 0 16px; color: #fff; max-width: 22ch; }
html[lang="hi-IN"] .page-head__title { font-family: var(--f-deva); font-weight: 700; line-height: 1.2; }
.page-head__lede { font-size: 1.15rem; color: var(--on-night); max-width: 62ch; margin: 0 0 14px; }
.page-head__meta { font-size: .88rem; color: var(--on-night-2); margin: 0; }
.crumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; padding: 0; margin: 0; font-size: .88rem; color: var(--on-night-2); }
.crumbs li + li::before { content: "/"; margin-right: 6px; color: var(--night-line); }
.crumbs a { color: var(--on-night-2); }
.crumbs a:hover { color: #fff; }
.wrap--media { margin-top: -0px; }
.media { margin: 32px 0; }
.media img { border-radius: var(--r-md); background: linear-gradient(135deg, var(--night-2), var(--night-3)); width: 100%; }
.media figcaption { font-size: .88rem; color: var(--ink-3); margin-top: 10px; }
.media--hero { margin: 28px 0 28px; }
.media--hero figcaption { margin-top: 8px; }

/* ---------- Article layout ---------- */
.layout { display: grid; grid-template-columns: minmax(0, 1fr) var(--rail); gap: 56px; padding-top: 0; padding-bottom: 64px; }
.layout > .rail, .layout > .prose { padding-top: 28px; }
.data-table td, .status__count b, .tool__big, .field input, .timeline__now-label, .session-mini, .status__line, .facts dd { font-variant-numeric: tabular-nums; }
.rail__sticky { position: sticky; top: 88px; display: flex; flex-direction: column; gap: 20px; }
@media (max-width: 1023px) {
  .layout { grid-template-columns: 1fr; gap: 24px; }
  .rail__sticky { position: static; }
  .rail .session-mini { display: none; }
}

.prose { max-width: 70ch; min-width: 0; }
.prose > *:first-child { margin-top: 0; }
.prose h2 { font: 700 clamp(1.6rem, 3vw, 2.05rem)/1.15 var(--f-cond); letter-spacing: -.01em; margin: 2.4em 0 .6em; color: var(--ink); }
.prose h3 { font: 600 1.22rem/1.3 var(--f-body); margin: 1.8em 0 .4em; }
html[lang="hi-IN"] .prose h2, .prose[lang="hi"] h2 { font-family: var(--f-deva); line-height: 1.35; }
.prose p, .prose ul, .prose ol { margin: 0 0 1.05em; }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li { margin-bottom: .35em; }
.prose li::marker { color: var(--ink-3); }
.prose strong { font-weight: 600; }
.prose .lead-answer { font-size: 1.15rem; line-height: 1.55; border-left: 3px solid var(--sun); padding: 2px 0 2px 18px; margin-bottom: 1.4em; }

.toc { background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-md); padding: 18px 22px; margin: 4px 0 28px; }
.toc__title { font: 700 1rem/1.2 var(--f-cond); margin: 0 0 8px !important; }
.toc ol { margin: 0; padding-left: 1.2em; columns: 2; column-gap: 32px; font-size: .95rem; }
.toc li { break-inside: avoid; margin-bottom: .3em; }
.toc a { text-decoration: none; color: var(--ink-2); }
.toc a:hover { color: var(--ink); text-decoration: underline; }
@media (max-width: 640px) { .toc ol { columns: 1; } }

/* tables */
.table-wrap { overflow-x: auto; margin: 1.2em 0 1.6em; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--paper); }
.data-table { width: 100%; border-collapse: collapse; font-size: .96rem; }
.data-table caption { text-align: left; padding: 14px 16px 0; font-weight: 600; color: var(--ink-2); font-size: .9rem; }
.data-table th, .data-table td { padding: 11px 16px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); }
.data-table thead th { font: 600 .9rem/1.3 var(--f-body); color: var(--ink-2); background: var(--mist); }
.data-table tbody tr:last-child td, .data-table tbody tr:last-child th { border-bottom: 0; }
.data-table tbody th { font-weight: 600; }
.data-table td.num { white-space: nowrap; }

.callout { background: var(--paper); border: 1px solid var(--line); border-left: 4px solid var(--sun); border-radius: var(--r-sm); padding: 16px 20px; margin: 1.4em 0; }
.callout p:last-child { margin-bottom: 0; }
.callout--warn { border-left-color: var(--rose); }

.facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border: 1px solid var(--line); border-radius: var(--r-md); background: var(--paper); margin: 1.4em 0; overflow: hidden; }
.facts div { padding: 14px 18px; border-bottom: 1px solid var(--line); }
.facts div:nth-child(odd) { border-right: 1px solid var(--line); }
.facts dt { font-size: .84rem; color: var(--ink-3); }
.facts dd { margin: 2px 0 0; font: 600 1.12rem/1.3 var(--f-cond); }
@media (max-width: 560px) { .facts { grid-template-columns: 1fr; } .facts div:nth-child(odd) { border-right: 0; } }

.steps { list-style: none; padding: 0 !important; counter-reset: s; }
.steps li { counter-increment: s; position: relative; padding-left: 48px; margin-bottom: 1.1em; }
.steps li::before { content: counter(s); position: absolute; left: 0; top: 0; width: 32px; height: 32px; border-radius: 50%; background: var(--night); color: #fff; font: 700 .95rem/32px var(--f-cond); text-align: center; }

/* FAQ */
.faq { margin-top: 2.4em; }
.faq__item { border-top: 1px solid var(--line); }
.faq__item:last-child { border-bottom: 1px solid var(--line); }
.faq summary { cursor: pointer; list-style: none; padding: 16px 36px 16px 0; font-weight: 600; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: ""; position: absolute; right: 6px; top: 22px; width: 10px; height: 10px; border-right: 2px solid var(--ink-3); border-bottom: 2px solid var(--ink-3); transform: rotate(45deg); transition: transform .2s; }
.faq details[open] summary::after { transform: rotate(-135deg); top: 26px; }
.faq__answer { padding: 0 0 16px; color: var(--ink-2); }
.faq__answer p:last-child { margin-bottom: 0; }

.sources { margin-top: 2.4em; padding-top: 1.2em; border-top: 1px solid var(--line); font-size: .92rem; }
.sources__title { font: 700 1.1rem/1.2 var(--f-cond) !important; margin: 0 0 .6em !important; }
.sources ul { padding-left: 1.2em; color: var(--ink-2); }

.related { margin-top: 2.4em; }
.related__title { font: 700 1.4rem/1.2 var(--f-cond) !important; margin-top: 0 !important; }
.related__list { list-style: none; padding: 0 !important; display: grid; gap: 0; border-top: 1px solid var(--line); }
.related__list li { margin: 0; border-bottom: 1px solid var(--line); }
.related__list a { display: block; padding: 14px 0; text-decoration: none; color: var(--ink); }
.related__list strong { display: block; font: 700 1.1rem/1.3 var(--f-cond); }
.related__list span { display: block; color: var(--ink-3); font-size: .92rem; }
.related__list a:hover strong { text-decoration: underline; text-decoration-color: var(--sun); text-underline-offset: 4px; }

/* ---------- Session mini (rail) ---------- */
.session-mini { background: var(--night); color: var(--on-night); border-radius: var(--r-md); padding: 18px 20px; }
.session-mini__head { display: flex; align-items: center; gap: 10px; margin: 0 0 8px; font: 600 1.15rem/1.2 var(--f-cond); color: #fff; }
.session-mini__line { margin: 0 0 4px; font-size: .9rem; color: var(--on-night-2); }
.session-mini__line strong { color: var(--on-night); font-weight: 600; }
.session-mini__clock { margin: 10px 0 0; padding-top: 10px; border-top: 1px solid var(--night-line); font-size: .85rem; color: var(--on-night-2); }
.session-mini__clock span { color: #fff; font-weight: 600; }

/* ---------- Gift card ---------- */
.gift-card { display: grid; grid-template-columns: 84px 1fr; gap: 16px; background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-md); padding: 18px; align-items: start; }
.gift-card__art img, .gift-card__art .media img { width: 84px; height: 84px; border-radius: var(--r-sm); object-fit: cover; background: var(--sun-soft); }
.gift-card__art .media { margin: 0; }
.gift-card__title { font: 700 1.15rem/1.2 var(--f-cond); margin: 0 0 6px; }
.gift-card__text { font-size: .9rem; color: var(--ink-2); margin: 0 0 12px; }
.gift-card .btn { padding: .7em 1em; font-size: .92rem; }
.prose .gift-card { margin: 2em 0; grid-template-columns: 120px 1fr; padding: 22px; border-left: 4px solid var(--sun); }
.prose .gift-card__art img { width: 120px; height: 120px; }
@media (max-width: 520px) { .prose .gift-card { grid-template-columns: 1fr; } .prose .gift-card__art img { width: 100%; height: 160px; } }

/* ---------- Tools (calculator) ---------- */
.tool { background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-md); padding: 22px; margin: 1.4em 0 2em; }
.tool__title { font: 700 1.3rem/1.2 var(--f-cond); margin: 0 0 4px; }
.tool__hint { margin: 0 0 18px; color: var(--ink-3); font-size: .92rem; }
.tool__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.field label { display: block; font-weight: 600; font-size: .92rem; margin-bottom: 6px; }
.field small { display: block; color: var(--ink-3); font-size: .82rem; margin-top: 4px; }
.field input { width: 100%; font: 600 1.25rem/1 var(--f-cond); padding: 12px 14px; border: 1.5px solid var(--line); border-radius: var(--r-sm); background: var(--mist); color: var(--ink); }
.field input:focus { outline: none; border-color: var(--night-3); background: #fff; }
.tool__result { margin-top: 20px; padding: 18px 20px; border-radius: var(--r-sm); background: var(--mist); display: grid; grid-template-columns: auto 1fr; gap: 6px 22px; align-items: baseline; }
.tool__big { font: 700 2.4rem/1 var(--f-cond); letter-spacing: -.01em; grid-row: span 2; }
.tool__big.up { color: var(--jade); }
.tool__big.down { color: var(--rose); }
.tool__verdict { font-weight: 600; margin: 0; }
.tool__detail { margin: 0; color: var(--ink-3); font-size: .9rem; }
.tool--compact { margin: 0; }
.tool--compact .tool__grid { grid-template-columns: 1fr; gap: 12px; }
.tool--compact .tool__result { grid-template-columns: 1fr; }
.tool--compact .tool__big { grid-row: auto; font-size: 2rem; }
@media (max-width: 560px) { .tool__grid { grid-template-columns: 1fr; } .tool__result { grid-template-columns: 1fr; } .tool__big { grid-row: auto; } }

/* ---------- Home content sections ---------- */
.home-content { padding: 48px 0 64px; }
.quick-links { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); margin: 8px 0 0; }
.quick-links a { padding: 20px 20px 22px 0; text-decoration: none; color: var(--ink); border-right: 1px solid var(--line); }
.quick-links a + a { padding-left: 20px; }
.quick-links a:last-child { border-right: 0; }
.quick-links strong { display: block; font: 700 1.2rem/1.2 var(--f-cond); margin-bottom: 4px; }
.quick-links span { color: var(--ink-3); font-size: .92rem; }
.quick-links a:hover strong { text-decoration: underline; text-decoration-color: var(--sun); text-underline-offset: 4px; }
@media (max-width: 760px) { .quick-links { grid-template-columns: 1fr; } .quick-links a, .quick-links a + a { border-right: 0; border-bottom: 1px solid var(--line); padding: 16px 0; } .quick-links a:last-child { border-bottom: 0; } }

/* ---------- Footer ---------- */
.site-footer { background: var(--night); color: var(--on-night-2); padding: 56px 0 24px; font-size: .92rem; }
.site-footer__grid { display: grid; grid-template-columns: 1.6fr repeat(3, 1fr); gap: 40px; }
.site-footer__about p { max-width: 44ch; }
.site-footer__legal { font-size: .82rem; color: #8287B3; }
.site-footer__title { color: #fff; font: 700 1rem/1.2 var(--f-cond); margin: 6px 0 12px; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: 8px; }
.site-footer a { color: var(--on-night-2); text-decoration: none; }
.site-footer a:hover { color: #fff; text-decoration: underline; }
.brand--footer { margin-bottom: 8px; }
.brand--footer:hover { text-decoration: none !important; }
.site-footer__bottom { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; border-top: 1px solid var(--night-line); margin-top: 40px; padding-top: 20px; font-size: .85rem; }
.site-footer__bottom p { margin: 0; }
@media (max-width: 860px) { .site-footer__grid { grid-template-columns: 1fr 1fr; } .site-footer__about { grid-column: 1 / -1; } }

/* ---------- Floating gift button ---------- */
.gift-fab { position: fixed; right: 20px; bottom: 20px; z-index: 30; display: inline-flex; align-items: center; gap: 8px; background: var(--sun); color: var(--night); border: 0; border-radius: 999px; padding: 12px 18px 12px 14px; font: 600 .95rem/1 var(--f-body); cursor: pointer; box-shadow: var(--shadow-pop); transition: transform .2s, opacity .2s; }
.gift-fab svg { width: 22px; height: 22px; }
.gift-fab:hover { transform: translateY(-2px); }
.gift-fab.is-hidden { opacity: 0; pointer-events: none; transform: translateY(12px); }
@media (max-width: 640px) { .gift-fab { right: 14px; bottom: 14px; padding: 12px; } .gift-fab span { display: none; } }

/* ---------- Gift dialog ---------- */
.gift-dialog { padding: 0; border: 0; background: transparent; max-width: min(760px, calc(100vw - 32px)); width: 100%; color: var(--on-night); }
.gift-dialog::backdrop { background: rgba(10, 11, 28, .62); }
.gift-dialog__panel { position: relative; display: grid; grid-template-columns: 260px 1fr; background: var(--night); border-radius: var(--r-lg); overflow: hidden; box-shadow: var(--shadow-pop); border-top: 3px solid var(--sun); }
.gift-dialog__art { background: radial-gradient(120% 90% at 50% 100%, rgba(238, 155, 47, .35), transparent 60%), var(--night-2); display: grid; place-items: center; padding: 24px; }
.gift-dialog__art img { width: 100%; max-width: 220px; aspect-ratio: 1; object-fit: cover; border-radius: var(--r-md); }
.gift-dialog__body { padding: 36px 32px 30px; }
.gift-dialog__title { font: 700 2rem/1.05 var(--f-cond); color: #fff; margin: 0 0 12px; letter-spacing: -.01em; }
.gift-dialog__text { margin: 0 0 22px; color: var(--on-night-2); }
.gift-dialog__close { position: absolute; top: 12px; right: 12px; width: 40px; height: 40px; border-radius: 50%; background: transparent; border: 1px solid var(--night-line); color: var(--on-night); cursor: pointer; display: grid; place-items: center; z-index: 2; }
.gift-dialog__close svg { width: 18px; height: 18px; }
.gift-dialog__close:hover { border-color: var(--on-night-2); }
.gift-dialog[open] { animation: rise .32s cubic-bezier(.2, .8, .2, 1); }
@keyframes rise { from { opacity: 0; transform: translateY(16px); } }
.gift-form__label { display: block; font-size: .88rem; color: var(--on-night-2); margin-bottom: 6px; }
.gift-form__row { display: flex; gap: 8px; }
.gift-form__input { flex: 1; min-width: 0; font: 500 1rem/1 var(--f-body); padding: 14px; border-radius: var(--r-sm); border: 1.5px solid var(--night-line); background: var(--night-2); color: #fff; }
.gift-form__input::placeholder { color: #7B80AD; }
.gift-form__input:focus { outline: none; border-color: var(--sun); }
.gift-form__input[aria-invalid="true"] { border-color: var(--rose); }
.gift-form__consent { display: flex; gap: 10px; align-items: flex-start; margin-top: 14px; font-size: .82rem; color: var(--on-night-2); line-height: 1.45; }
.gift-form__consent input { margin-top: 2px; width: 18px; height: 18px; accent-color: var(--sun); flex: none; }
.gift-form__consent a { color: var(--on-night); }
.gift-form__status { min-height: 1.4em; margin: 12px 0 0; font-size: .9rem; color: var(--sun); }
.gift-form__status.is-error { color: #FF8E97; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.btn[disabled] { opacity: .6; cursor: progress; }

@media (max-width: 640px) {
  /* Bottom sheet on phones: covers less than half the screen (Google intrusive-interstitial guideline). */
  .gift-dialog { margin: auto 0 0; max-width: 100vw; width: 100vw; max-height: 72vh; }
  .gift-dialog__panel { grid-template-columns: 1fr; border-radius: var(--r-lg) var(--r-lg) 0 0; }
  .gift-dialog__art { display: none; }
  .gift-dialog__body { padding: 26px 20px 22px; }
  .gift-dialog__title { font-size: 1.6rem; padding-right: 40px; }
  .gift-dialog__text { font-size: .95rem; margin-bottom: 16px; }
  .gift-form__row { flex-direction: column; }
  .gift-dialog[open] { animation: sheet .32s cubic-bezier(.2, .8, .2, 1); }
  @keyframes sheet { from { transform: translateY(100%); } }
}

/* 404 */
.notfound { padding: 80px 0 100px; }
.notfound h1 { font: 700 clamp(2.4rem, 6vw, 4rem)/1 var(--f-cond); margin: 0 0 16px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
@media print {
  .site-header, .gift-fab, .gift-dialog, .rail, .site-footer { display: none !important; }
}

/* tool headings inside prose keep their own scale */
.prose .tool .tool__title { margin: 0 0 4px; font: 700 1.35rem/1.2 var(--f-cond); }
.prose > .tool:first-child { margin-top: 0; }
