/* ==========================================================================
   1REY — Content, articles, glossary and calculators
   ========================================================================== */

/* ---------- homepage hero tuning ---------- */
.hero--home {
  min-height: 0;
  padding-top: calc(var(--header-h) + 46px);
  padding-bottom: 44px;
}
.hero--home .hero-inner { align-items: start; }
.hero--home .hero-copy { padding-top: 14px; }
.hero--home .hero-lead { max-width: 530px; }
.hero--home .query-wrap { max-width: 470px; }
.home-contact {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 9px 20px;
  margin-top: 18px;
  font-size: 10px;
  color: rgba(255, 255, 255, 0.62);
}
.home-contact a,
.home-contact span { display: inline-flex; align-items: center; gap: 6px; }
.home-contact .ic { color: var(--gold-2); font-size: 14px; }
.home-contact a:hover { color: var(--gold-1); }

/* ---------- shared page shell ---------- */
.page-main {
  padding-top: calc(var(--header-h) + 22px);
  min-height: 70vh;
}
.page-main .container {
  max-width: 1180px;
}
.breadcrumbs {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 7px;
  margin-bottom: 20px;
  font-size: 10.5px;
  color: var(--dim);
}
.breadcrumbs a {
  color: var(--muted);
  transition: color 0.2s;
}
.breadcrumbs a:hover { color: var(--gold-2); }
.breadcrumbs .ic { font-size: 12px; opacity: 0.65; }

.demo-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 9px;
  border-radius: 99px;
  border: 1px solid rgba(242, 182, 75, 0.28);
  background: rgba(242, 182, 75, 0.09);
  color: var(--warn);
  font-size: 9.5px;
  font-weight: 600;
  white-space: nowrap;
}
.demo-pill .ic { font-size: 12px; }

.page-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
}
.qr-validity {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 11px;
}
.qr-validity .badge { font-size: 8.5px; padding: 3px 7px; }
.qr-validity .badge .ic { font-size: 11px; }
.qr-validity .demo-note { font-size: 8.5px; color: var(--dim); }

/* ---------- inner page hero ---------- */
.page-hero {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  padding: clamp(26px, 5vw, 48px);
  margin-bottom: clamp(28px, 5vw, 46px);
  background:
    radial-gradient(680px 320px at 88% -10%, rgba(232, 197, 106, 0.14), transparent 70%),
    radial-gradient(500px 300px at 8% 110%, rgba(232, 197, 106, 0.05), transparent 70%),
    linear-gradient(145deg, #16161e 0%, #0f0f14 58%, #0c0c11 100%);
  isolation: isolate;
}
.page-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image:
    linear-gradient(rgba(232, 197, 106, 0.028) 1px, transparent 1px),
    linear-gradient(90deg, rgba(232, 197, 106, 0.028) 1px, transparent 1px);
  background-size: 52px 52px;
  mask-image: radial-gradient(640px 300px at 80% 10%, #000, transparent 80%);
  -webkit-mask-image: radial-gradient(640px 300px at 80% 10%, #000, transparent 80%);
  pointer-events: none;
}
.page-hero--center {
  text-align: center;
  padding-block: clamp(38px, 7vw, 68px);
}
.page-hero--center .page-lead { margin-inline: auto; }
.page-hero h1 {
  font-size: clamp(1.65rem, 4vw, 2.75rem);
  line-height: 1.35;
  margin: 12px 0 14px;
  letter-spacing: -0.02em;
}
.page-hero .eyebrow { margin-bottom: 4px; }
.page-lead {
  max-width: 720px;
  color: var(--text-2);
  font-size: 13px;
  line-height: 2.1;
}
.page-hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 20px;
}
.page-hero-meta span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 10.5px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 5px 9px;
}
.page-hero-meta .ic { font-size: 13px; color: var(--gold-2); }

/* ---------- section headings ---------- */
.content-section { margin-bottom: clamp(34px, 6vw, 60px); }
.content-section:last-child { margin-bottom: 0; }
.section-head--inline {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 22px;
  max-width: none;
}
.section-head--inline h2 { font-size: clamp(1.2rem, 2.2vw, 1.6rem); }
.section-head--inline .link-gold {
  font-size: 11.5px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.section-head--inline .link-gold .ic { font-size: 15px; }

/* ---------- quick access cards ---------- */
.quick-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}
.quick-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 9px;
  padding: 20px 18px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: linear-gradient(165deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0.008));
  overflow: hidden;
  transition: 0.3s var(--ease);
}
.quick-card:hover {
  transform: translateY(-4px);
  border-color: var(--gold-line);
  background: linear-gradient(165deg, rgba(232, 197, 106, 0.1), rgba(255, 255, 255, 0.01));
}
.quick-card .quick-icon {
  width: 40px;
  height: 40px;
  border-radius: 11px;
  display: grid;
  place-items: center;
  background: rgba(232, 197, 106, 0.09);
  border: 1px solid var(--gold-line);
  color: var(--gold-2);
}
.quick-card .quick-icon .ic { font-size: 20px; }
.quick-card strong { font-size: 12.5px; }
.quick-card span { font-size: 10.5px; color: var(--muted); line-height: 1.8; }
.quick-card .q-arrow {
  position: absolute;
  top: 16px;
  inset-inline-end: 15px;
  color: var(--dim);
  font-size: 15px;
  transition: 0.25s;
}
.quick-card:hover .q-arrow { color: var(--gold-2); transform: translateX(-3px); }
.quick-grid--six { grid-template-columns: repeat(3, 1fr); }

/* ---------- homepage calculator showcase ---------- */
.home-tools {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr);
  gap: clamp(24px, 4vw, 50px);
  align-items: center;
  padding: clamp(24px, 4vw, 42px);
  border-radius: var(--radius-xl);
  border: 1px solid var(--line);
  background:
    radial-gradient(620px 300px at 10% 0%, rgba(232, 197, 106, 0.1), transparent 70%),
    linear-gradient(155deg, #15151d, #0d0d12 65%);
  overflow: hidden;
}
.home-tools::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(232, 197, 106, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(232, 197, 106, 0.03) 1px, transparent 1px);
  background-size: 46px 46px;
  mask-image: radial-gradient(500px 300px at 18% 20%, #000, transparent 75%);
  -webkit-mask-image: radial-gradient(500px 300px at 18% 20%, #000, transparent 75%);
  pointer-events: none;
}
.home-tools-copy { position: relative; z-index: 1; }
.home-tools-copy h2 { margin: 7px 0 11px; font-size: clamp(1.35rem, 2.8vw, 2.05rem); line-height: 1.5; }
.home-tools-copy > p { font-size: 12px; line-height: 2; color: var(--muted); margin-bottom: 16px; max-width: 470px; }
.home-tools-copy .showcase-list { margin-bottom: 20px; }
.home-tool-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
}
.home-tool {
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 16px 14px;
  border-radius: 13px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.025);
  transition: 0.25s var(--ease);
}
.home-tool:hover {
  border-color: var(--gold-line);
  background: rgba(232, 197, 106, 0.065);
  transform: translateY(-3px);
}
.home-tool .ht-icon {
  width: 33px;
  height: 33px;
  border-radius: 9px;
  display: grid;
  place-items: center;
  background: var(--gold-soft);
  border: 1px solid var(--gold-line);
  color: var(--gold-2);
  margin-bottom: 2px;
}
.home-tool .ht-icon .ic { font-size: 17px; }
.home-tool strong { font-size: 10.5px; }
.home-tool span { font-size: 9px; color: var(--dim); line-height: 1.7; }
.home-tool b { font-size: 13px; color: var(--gold-1); font-weight: 700; direction: ltr; text-align: right; }
.home-tools-note {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 2px;
  font-size: 8.5px;
  color: var(--dim);
}
.home-tools-note .ic { font-size: 12px; color: var(--warn); }

/* ---------- article cards ---------- */
.article-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}
.article-grid--two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.article-card {
  display: flex;
  flex-direction: column;
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  background: linear-gradient(170deg, rgba(255, 255, 255, 0.032), rgba(255, 255, 255, 0.006)), var(--surface);
  overflow: hidden;
  transition: 0.35s var(--ease);
}
.article-card:hover {
  transform: translateY(-5px);
  border-color: var(--gold-line);
  box-shadow: 0 28px 60px -30px rgba(0, 0, 0, 0.85);
}
.article-card-media {
  position: relative;
  display: block;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--surface-2);
}
.article-card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.7s var(--ease), opacity 0.3s;
  opacity: 0.9;
}
.article-card:hover .article-card-media img { transform: scale(1.06); opacity: 1; }
.article-card-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(8, 8, 11, 0.62), transparent 55%);
  pointer-events: none;
}
.article-cat {
  position: absolute;
  bottom: 10px;
  inset-inline-start: 10px;
  z-index: 1;
  padding: 3px 8px;
  border-radius: 5px;
  background: rgba(8, 8, 11, 0.72);
  border: 1px solid var(--gold-line);
  color: var(--gold-1);
  font-size: 9px;
  font-weight: 600;
  backdrop-filter: blur(8px);
}
.article-cat--static {
  position: static;
  display: inline-flex;
  width: fit-content;
  padding: 4px 10px;
  font-size: 9.5px;
}
.article-card-body {
  display: flex;
  flex-direction: column;
  gap: 7px;
  padding: 17px 17px 16px;
  flex: 1;
}
.article-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  font-size: 9.5px;
  color: var(--dim);
}
.article-meta .meta-dot {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--dim);
}
.article-card h3 {
  font-size: 13.5px;
  line-height: 1.65;
  font-weight: 700;
}
.article-card h3 a { transition: color 0.2s; }
.article-card h3 a:hover { color: var(--gold-1); }
.article-card p {
  font-size: 10.5px;
  line-height: 1.95;
  color: var(--muted);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.article-more {
  margin-top: auto;
  padding-top: 10px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--gold-2);
  font-size: 10.5px;
  font-weight: 600;
}
.article-more .ic { font-size: 14px; transition: transform 0.25s; }
.article-more:hover .ic { transform: translateX(-3px); }
.article-card--compact .article-card-body { padding: 15px; }
.article-card--compact h3 { font-size: 12.5px; }
.article-card--compact p { -webkit-line-clamp: 2; }

.article-card--skeleton { pointer-events: none; }
.sk-media,
.sk-lines span {
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.04));
  background-size: 200% 100%;
  animation: shimmer 1.4s infinite linear;
}
.sk-media { aspect-ratio: 16 / 9; }
.sk-lines { padding: 18px; display: flex; flex-direction: column; gap: 9px; }
.sk-lines span { height: 9px; border-radius: 4px; }
.sk-lines span:nth-child(2) { width: 82%; }
.sk-lines span:nth-child(3) { width: 58%; }
@keyframes shimmer { to { background-position: -200% 0; } }

/* ---------- filters / search ---------- */
.filter-bar {
  display: flex;
  flex-direction: column;
  gap: 13px;
  margin-bottom: 24px;
}
.filter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.filter-chip {
  padding: 6px 12px;
  border-radius: 99px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.025);
  color: var(--muted);
  font-size: 10.5px;
  transition: 0.2s;
}
.filter-chip span {
  color: var(--dim);
  font-size: 9px;
  margin-inline-start: 2px;
}
.filter-chip:hover { border-color: var(--gold-line); color: var(--text); }
.filter-chip.active {
  background: var(--gold-soft);
  border-color: var(--gold-line-strong);
  color: var(--gold-1);
}
.filter-chip.active span { color: var(--gold-2); }
.search-field {
  position: relative;
  width: 100%;
}
.search-field > .ic {
  position: absolute;
  inset-inline-start: 15px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--dim);
  font-size: 18px;
  pointer-events: none;
}
.search-field input {
  width: 100%;
  height: 50px;
  padding-inline: 46px 16px;
  border-radius: 12px;
  border: 1px solid var(--line-2);
  background: rgba(0, 0, 0, 0.28);
  color: var(--text);
  font-size: 12.5px;
  transition: 0.2s;
}
.search-field input::placeholder { color: var(--dim); }
.search-field input:focus {
  outline: 0;
  border-color: var(--gold-3);
  box-shadow: 0 0 0 4px rgba(232, 197, 106, 0.07);
}
.filter-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 10px;
  color: var(--dim);
}
.filter-meta b { color: var(--gold-2); font-weight: 600; }

/* ---------- empty / error states ---------- */
.data-error {
  grid-column: 1 / -1;
  text-align: center;
  padding: 48px 22px;
  border: 1px dashed var(--line-2);
  border-radius: var(--radius);
  color: var(--muted);
}
.data-error .ic { font-size: 28px; color: var(--gold-2); }
.data-error h3 { font-size: 14px; margin: 10px 0 5px; color: var(--text); }
.data-error p { font-size: 11px; line-height: 1.9; }
.data-error--empty .ic { opacity: 0.8; }

/* ==========================================================================
   Article detail
   ========================================================================== */
.article-header {
  max-width: 820px;
  margin-bottom: 24px;
}
.article-header h1 {
  font-size: clamp(1.55rem, 3.6vw, 2.5rem);
  line-height: 1.45;
  margin: 12px 0 14px;
  letter-spacing: -0.02em;
}
.article-deck {
  font-size: 13px;
  line-height: 2.05;
  color: var(--text-2);
  max-width: 740px;
}
.article-meta--header { margin-top: 15px; font-size: 10.5px; }
.article-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: clamp(20px, 4vw, 40px);
  align-items: start;
}
.article-main { min-width: 0; }
.article-hero {
  margin: 0 0 22px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--surface);
}
.article-hero img {
  width: 100%;
  display: block;
  aspect-ratio: 16 / 8.6;
  object-fit: cover;
}
.article-hero figcaption {
  padding: 9px 14px;
  font-size: 9px;
  color: var(--dim);
  border-top: 1px solid var(--line);
}
.takeaways {
  padding: 18px 20px;
  border-radius: var(--radius);
  border: 1px solid var(--gold-line);
  background: linear-gradient(135deg, rgba(232, 197, 106, 0.09), rgba(232, 197, 106, 0.015));
  margin-bottom: 26px;
}
.takeaways-head {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 10px;
  color: var(--gold-1);
  font-size: 12px;
}
.takeaways-head .ic { font-size: 17px; color: var(--gold-2); }
.takeaways ul {
  display: flex;
  flex-direction: column;
  gap: 7px;
  padding-inline-start: 16px;
  list-style: disc;
}
.takeaways li { font-size: 11.5px; line-height: 1.95; color: var(--text-2); }

.prose { font-size: 13px; line-height: 2.15; color: var(--text-2); }
.article-section { margin-bottom: 34px; scroll-margin-top: 100px; }
.article-section h2 {
  position: relative;
  font-size: clamp(1.15rem, 2vw, 1.4rem);
  margin-bottom: 12px;
  padding-inline-start: 14px;
  color: var(--text);
}
.article-section h2::before {
  content: "";
  position: absolute;
  inset-inline-start: 0;
  top: 7px;
  bottom: 7px;
  width: 3px;
  border-radius: 3px;
  background: var(--gold-grad);
}
.prose p { margin-bottom: 13px; }
.prose ul,
.prose ol {
  margin: 4px 0 18px;
  padding-inline-start: 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.prose li { font-size: 12.5px; line-height: 2; }
.prose strong { color: var(--text); }

/* tables */
.table-wrap {
  width: 100%;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  margin: 18px 0 22px;
  background: var(--surface);
}
.table-wrap table {
  width: 100%;
  border-collapse: collapse;
  min-width: 430px;
  font-size: 11px;
}
.table-wrap th {
  padding: 11px 13px;
  text-align: right;
  color: var(--gold-1);
  font-weight: 700;
  background: rgba(232, 197, 106, 0.055);
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
.table-wrap td {
  padding: 10px 13px;
  border-bottom: 1px solid var(--line);
  color: var(--text-2);
}
.table-wrap tr:last-child td { border-bottom: 0; }
.table-wrap tbody tr:hover td { background: rgba(255, 255, 255, 0.018); }

.article-disclaimer {
  display: flex;
  gap: 9px;
  align-items: flex-start;
  padding: 13px 15px;
  border-radius: 10px;
  border: 1px solid rgba(126, 169, 255, 0.17);
  background: rgba(126, 169, 255, 0.055);
  margin: 28px 0;
}
.article-disclaimer .ic { color: var(--info); font-size: 16px; flex: none; margin-top: 2px; }
.article-disclaimer p { font-size: 10px; line-height: 1.9; color: var(--muted); }

.article-cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
  padding: 20px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--gold-line);
  background:
    radial-gradient(360px 180px at 0% 0%, rgba(232, 197, 106, 0.12), transparent 70%),
    linear-gradient(135deg, rgba(232, 197, 106, 0.06), rgba(255, 255, 255, 0.01));
}
.article-cta h3 { font-size: 14px; margin: 4px 0; }
.article-cta p { font-size: 10.5px; color: var(--muted); line-height: 1.85; max-width: 560px; }
.related-articles { margin-top: 38px; }

.article-side {
  position: sticky;
  top: 92px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.side-panel {
  padding: 17px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--surface);
}
.side-panel h3 {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11.5px;
  margin-bottom: 10px;
}
.side-panel h3 .ic { font-size: 15px; color: var(--gold-2); }
.side-panel p { font-size: 10px; line-height: 1.9; color: var(--muted); margin-bottom: 11px; }
.side-panel .side-icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: rgba(232, 197, 106, 0.09);
  border: 1px solid var(--gold-line);
  color: var(--gold-2);
  margin-bottom: 10px;
}
.side-panel .side-icon .ic { font-size: 19px; }
.side-panel--calculator { border-color: var(--gold-line); background: linear-gradient(160deg, rgba(232, 197, 106, 0.07), var(--surface) 65%); }
.side-panel--calculator h3 { margin-bottom: 5px; }
.toc { display: flex; flex-direction: column; gap: 2px; }
.toc a {
  font-size: 10.5px;
  color: var(--muted);
  padding: 6px 8px;
  border-radius: 6px;
  border-inline-start: 1px solid var(--line-2);
  line-height: 1.7;
  transition: 0.2s;
}
.toc a:hover { color: var(--gold-1); background: var(--gold-soft); border-inline-start-color: var(--gold-2); }
.share-row { display: flex; gap: 6px; flex-wrap: wrap; }
.share-row .btn { flex: 1; }
.side-panel--inquiry { background: linear-gradient(160deg, rgba(232, 197, 106, 0.045), var(--surface)); }

.article-notfound {
  text-align: center;
  padding: 70px 20px;
  border: 1px dashed var(--line-2);
  border-radius: var(--radius-lg);
}
.article-notfound .nf-icon {
  width: 66px;
  height: 66px;
  margin: 0 auto 14px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(232, 197, 106, 0.08);
  border: 1px solid var(--gold-line);
  color: var(--gold-2);
}
.article-notfound .nf-icon .ic { font-size: 30px; }
.article-notfound h1 { font-size: 1.5rem; margin-bottom: 8px; }
.article-notfound p { font-size: 11.5px; color: var(--muted); margin-bottom: 20px; }
.article-notfound .page-actions { justify-content: center; }

/* ==========================================================================
   Glossary
   ========================================================================== */
.glossary-loading {
  text-align: center;
  padding: 50px 0;
  color: var(--muted);
  font-size: 11px;
}
.glossary-loading .spinner { margin: 0 auto 12px; }
.glossary-group { margin-bottom: 34px; }
.glossary-group-head {
  display: flex;
  align-items: baseline;
  gap: 9px;
  margin-bottom: 13px;
}
.glossary-group-head h2 { font-size: 15px; color: var(--gold-1); }
.glossary-group-head span { font-size: 9.5px; color: var(--dim); }
.glossary-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 11px;
}
.term-card {
  position: relative;
  padding: 17px 17px 15px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: linear-gradient(165deg, rgba(255, 255, 255, 0.028), rgba(255, 255, 255, 0.006)), var(--surface);
  transition: 0.3s var(--ease);
}
.term-card:hover { border-color: var(--gold-line); transform: translateY(-3px); }
.term-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 5px;
}
.term-head h3 { font-size: 13px; color: var(--text); }
.term-cat {
  font-size: 8px;
  color: var(--gold-2);
  padding: 2px 6px;
  border-radius: 4px;
  background: var(--gold-soft);
  white-space: nowrap;
}
.term-aliases {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-bottom: 7px;
}
.term-aliases span {
  direction: ltr;
  font-size: 8px;
  color: var(--dim);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 1px 5px;
}
.term-card p { font-size: 10.5px; line-height: 1.95; color: var(--muted); }
.term-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: 9px;
  padding-top: 8px;
  border-top: 1px solid var(--line);
  width: 100%;
  color: var(--gold-2);
  font-size: 9.5px;
  font-weight: 600;
}
.term-link .ic { font-size: 13px; }
.term-link:hover { color: var(--gold-1); }

/* ==========================================================================
   Calculators
   ========================================================================== */
.calc-tabs {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-bottom: 22px;
}
.calc-tab {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 13px 8px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.025);
  color: var(--muted);
  font-size: 10.5px;
  font-weight: 600;
  line-height: 1.5;
  transition: 0.25s var(--ease);
  text-align: center;
}
.calc-tab .ic { font-size: 18px; }
.calc-tab:hover { border-color: var(--gold-line); color: var(--text); }
.calc-tab.active {
  background: linear-gradient(155deg, rgba(232, 197, 106, 0.14), rgba(232, 197, 106, 0.035));
  border-color: var(--gold-line-strong);
  color: var(--gold-1);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}
.calc-tab.active .ic { color: var(--gold-2); }
.calc-panel { animation: fadeUp 0.35s var(--ease); scroll-margin-top: 86px; }
.calc-panel[hidden] { display: none !important; }
.calc-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.08fr);
  gap: 18px;
  align-items: start;
}
.calc-form,
.calc-output {
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  background: var(--surface);
  padding: 20px;
  min-width: 0;
}
.calc-form { background: linear-gradient(170deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.006)), var(--surface); }
.calc-form-head { margin-bottom: 16px; }
.calc-form-head h2 {
  font-size: 15px;
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}
.calc-form-head h2 .ic { font-size: 19px; color: var(--gold-2); }
.calc-form-head p { font-size: 10px; color: var(--dim); line-height: 1.8; }
.calc-output { min-height: 260px; display: flex; flex-direction: column; }

.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 13px; }
.field > span,
.mini-field > span {
  font-size: 10px;
  color: var(--muted);
  font-weight: 500;
}
.field input,
.field select,
.mini-field input {
  width: 100%;
  height: 45px;
  padding-inline: 12px;
  border-radius: 9px;
  border: 1px solid var(--line-2);
  background: rgba(0, 0, 0, 0.3);
  color: var(--text);
  font-size: 12.5px;
  font-variant-numeric: tabular-nums;
  transition: 0.2s;
}
.field select {
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--dim) 50%), linear-gradient(135deg, var(--dim) 50%, transparent 50%);
  background-position: calc(0% + 14px) 51%, calc(0% + 19px) 51%;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
  padding-inline-end: 36px;
}
.field input:focus,
.field select:focus,
.mini-field input:focus {
  outline: 0;
  border-color: var(--gold-3);
  box-shadow: 0 0 0 3px rgba(232, 197, 106, 0.08);
}
.field input::placeholder,
.mini-field input::placeholder { color: #5c5953; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.field-row .field { margin-bottom: 0; }
.field-hint { font-size: 9px; color: var(--dim); line-height: 1.7; }
.field-unit {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 9px;
  color: var(--gold-2);
  font-weight: 500;
}
.segmented {
  display: flex;
  gap: 4px;
  padding: 4px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.22);
  margin-bottom: 13px;
}
.segmented button {
  flex: 1;
  padding: 7px 5px;
  border-radius: 7px;
  font-size: 9.5px;
  color: var(--dim);
  transition: 0.2s;
  white-space: nowrap;
}
.segmented button:hover { color: var(--text); }
.segmented button.active {
  background: var(--gold-soft);
  color: var(--gold-1);
  box-shadow: inset 0 0 0 1px var(--gold-line);
}
.calc-error {
  display: flex;
  gap: 7px;
  align-items: flex-start;
  padding: 9px 11px;
  border-radius: 8px;
  border: 1px solid rgba(255, 123, 123, 0.24);
  background: rgba(255, 123, 123, 0.07);
  color: var(--bad);
  font-size: 10px;
  line-height: 1.8;
  margin-bottom: 12px;
}
.calc-error .ic { font-size: 14px; flex: none; margin-top: 1px; }
.form-actions { display: flex; gap: 8px; margin-top: 15px; }
.form-actions .btn { flex: 1; }
.form-actions .btn-gold { flex: 1.3; }
.calc-samples {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 11px;
  font-size: 9px;
  color: var(--dim);
}
.calc-samples button {
  padding: 3px 7px;
  border-radius: 5px;
  border: 1px dashed var(--gold-line);
  color: var(--gold-2);
  font-size: 9px;
}
.calc-samples button:hover { background: var(--gold-soft); border-style: solid; }

/* calculator results */
.calc-empty {
  margin: auto;
  text-align: center;
  padding: 30px 12px;
  color: var(--dim);
}
.calc-empty-icon {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  margin: 0 auto 12px;
  background: rgba(232, 197, 106, 0.06);
  border: 1px dashed var(--gold-line);
  color: var(--gold-2);
}
.calc-empty-icon .ic { font-size: 24px; }
.calc-empty h3 { font-size: 11.5px; color: var(--muted); margin-bottom: 4px; }
.calc-empty p { font-size: 9.5px; line-height: 1.9; max-width: 300px; margin-inline: auto; }

.calc-result { animation: fadeUp 0.3s var(--ease); }
.result-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 13px;
}
.result-kicker { font-size: 8.5px; color: var(--gold-2); font-weight: 600; }
.result-head h3 { font-size: 13px; margin-top: 1px; }
.result-demo {
  font-size: 8px;
  color: var(--dim);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 1px 5px;
  white-space: nowrap;
}
.result-focus {
  display: flex;
  align-items: baseline;
  gap: 6px;
  flex-wrap: wrap;
  padding: 13px 15px;
  border-radius: 11px;
  border: 1px solid var(--gold-line);
  background: linear-gradient(135deg, rgba(232, 197, 106, 0.1), rgba(232, 197, 106, 0.02));
  margin-bottom: 10px;
}
.result-focus span { font-size: 10px; color: var(--muted); }
.result-focus strong {
  font-size: clamp(25px, 4vw, 34px);
  font-weight: 800;
  color: var(--gold-1);
  line-height: 1.2;
  font-variant-numeric: tabular-nums;
}
.result-focus small { font-size: 9.5px; color: var(--dim); }
.result-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  margin-bottom: 10px;
}
.result-grid--three { grid-template-columns: repeat(3, 1fr); }
.result-grid > div {
  padding: 9px 10px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.028);
  border: 1px solid var(--line);
  min-width: 0;
}
.result-grid > div.is-gold { border-color: var(--gold-line); background: rgba(232, 197, 106, 0.055); }
.result-grid span { display: block; font-size: 8.5px; color: var(--dim); margin-bottom: 2px; }
.result-grid b { font-size: 11.5px; font-weight: 600; color: var(--text); white-space: nowrap; }
.result-grid .is-gold b { color: var(--gold-1); }
.result-detail-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  margin: 10px 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: var(--line);
}
.result-detail-pair > div { background: #131319; padding: 8px 10px; }
.result-detail-pair span { display: block; font-size: 8px; color: var(--dim); margin-bottom: 1px; }
.result-detail-pair b { font-size: 10.5px; font-weight: 600; }
.formula-line {
  display: flex;
  align-items: flex-start;
  gap: 7px;
  margin-top: 10px;
  padding: 8px 10px;
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid var(--line);
  direction: rtl;
  flex-wrap: wrap;
}
.formula-label {
  font-size: 8px;
  color: var(--gold-2);
  border: 1px solid var(--gold-line);
  border-radius: 10px;
  padding: 1px 6px;
  white-space: nowrap;
}
.formula-body {
  font-size: 9.5px;
  color: var(--text-2);
  line-height: 1.9;
  direction: rtl;
  font-variant-numeric: tabular-nums;
}
.formula-body sub { font-size: 7px; }
.result-note { font-size: 9px; color: var(--dim); line-height: 1.9; margin-top: 9px; }
.calc-warning {
  display: flex;
  gap: 7px;
  align-items: flex-start;
  margin-top: 10px;
  padding: 9px 11px;
  border-radius: 8px;
  border: 1px solid rgba(242, 182, 75, 0.23);
  background: rgba(242, 182, 75, 0.06);
}
.calc-warning .ic { color: var(--warn); font-size: 14px; flex: none; margin-top: 1px; }
.calc-warning p { font-size: 9px; line-height: 1.9; color: var(--muted); }
.ratio-bar {
  height: 10px;
  border-radius: 99px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.09);
  margin: 12px 0 7px;
  border: 1px solid var(--line);
}
.ratio-pure {
  display: block;
  height: 100%;
  background: var(--gold-grad);
  border-radius: 99px;
  box-shadow: 0 0 12px rgba(232, 197, 106, 0.35);
  transition: width 0.5s var(--ease);
}
.ratio-legend {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
  font-size: 8.5px;
  color: var(--dim);
  margin-bottom: 10px;
}
.ratio-legend span { display: inline-flex; align-items: center; gap: 4px; }
.ratio-legend i { width: 6px; height: 6px; border-radius: 2px; display: inline-block; }
.dot-gold { background: var(--gold-2); }
.dot-dim { background: rgba(255, 255, 255, 0.18); }
.mini-table { margin: 10px 0; }
.mini-table table { min-width: 340px; font-size: 9.5px; }
.mini-table th { padding: 7px 9px; font-size: 8.5px; }
.mini-table td { padding: 7px 9px; }

/* weighted rows */
.weight-rows { display: flex; flex-direction: column; gap: 7px; margin-bottom: 10px; }
.weight-row {
  display: grid;
  grid-template-columns: 18px 1fr 1fr 28px;
  gap: 7px;
  align-items: end;
  padding: 8px;
  border-radius: 9px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.018);
}
.row-index {
  align-self: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--gold-soft);
  border: 1px solid var(--gold-line);
  color: var(--gold-2);
  font-size: 8px;
  font-weight: 600;
}
.mini-field { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.mini-field input { height: 35px; font-size: 11px; padding-inline: 8px; }
.mini-field > span { font-size: 8.5px; }
.row-remove {
  width: 27px;
  height: 27px;
  border-radius: 6px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  color: var(--dim);
  margin-bottom: 4px;
  transition: 0.2s;
}
.row-remove:hover { color: var(--bad); border-color: rgba(255, 123, 123, 0.25); background: rgba(255, 123, 123, 0.06); }
.row-remove[disabled] { opacity: 0.3; pointer-events: none; }
.row-remove .ic { font-size: 13px; }
.add-row-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 9.5px;
  color: var(--gold-2);
  padding: 5px 8px;
  border-radius: 6px;
  border: 1px dashed var(--gold-line);
  margin-bottom: 6px;
}
.add-row-btn:hover { background: var(--gold-soft); border-style: solid; }
.add-row-btn .ic { font-size: 12px; }

/* formula / assumptions notes */
.calc-notes {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 16px;
}
.note-box {
  padding: 14px 16px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.015);
}
.note-box h3 {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 10.5px;
  margin-bottom: 7px;
  color: var(--text);
}
.note-box h3 .ic { font-size: 14px; color: var(--gold-2); }
.note-box p { font-size: 9.5px; line-height: 1.95; color: var(--muted); }
.note-box code {
  font-family: Vazirmatn, sans-serif;
  font-size: 9.5px;
  color: var(--gold-1);
  background: rgba(232, 197, 106, 0.06);
  padding: 1px 4px;
  border-radius: 3px;
}
.note-box ul { padding-inline-start: 14px; display: flex; flex-direction: column; gap: 4px; }
.note-box li { font-size: 9.5px; line-height: 1.8; color: var(--muted); }

/* calculator intro strip */
.calc-intro {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  padding: 12px 16px;
  border-radius: 12px;
  border: 1px solid var(--gold-line);
  background: rgba(232, 197, 106, 0.04);
  margin-bottom: 20px;
  font-size: 10px;
  color: var(--muted);
  line-height: 1.8;
}
.calc-intro .ic { color: var(--gold-2); font-size: 18px; flex: none; }
.calc-intro strong { color: var(--gold-1); }

/* ==========================================================================
   Static informational pages (about, services, contact, privacy)
   ========================================================================== */
.info-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 310px;
  gap: clamp(20px, 4vw, 40px);
  align-items: start;
}
.info-main { min-width: 0; }
.info-side { display: flex; flex-direction: column; gap: 12px; position: sticky; top: 92px; }
.info-card {
  padding: 20px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  background: var(--surface);
}
.info-card h3 {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 12px;
  margin-bottom: 10px;
}
.info-card h3 .ic { color: var(--gold-2); font-size: 16px; }
.info-card p { font-size: 10.5px; line-height: 2; color: var(--muted); margin-bottom: 10px; }
.info-card p:last-child { margin-bottom: 0; }
.info-card--gold { border-color: var(--gold-line); background: linear-gradient(160deg, rgba(232, 197, 106, 0.07), var(--surface) 60%); }
.info-list { display: flex; flex-direction: column; gap: 9px; }
.info-list li { display: flex; gap: 8px; font-size: 10.5px; line-height: 1.85; color: var(--muted); }
.info-list .ic { color: var(--gold-2); font-size: 14px; flex: none; margin-top: 3px; }
.stats-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin: 20px 0;
}
.stats-row > div {
  padding: 15px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--surface);
  text-align: center;
}
.stats-row b { display: block; font-size: 21px; color: var(--gold-1); line-height: 1.3; }
.stats-row span { font-size: 9px; color: var(--dim); }
.contact-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 11px;
  margin: 18px 0;
}
.contact-card {
  display: flex;
  gap: 11px;
  align-items: flex-start;
  padding: 16px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--surface);
}
.contact-card .cc-icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: var(--gold-soft);
  border: 1px solid var(--gold-line);
  color: var(--gold-2);
  flex: none;
}
.contact-card .cc-icon .ic { font-size: 18px; }
.contact-card h4 { font-size: 10.5px; margin-bottom: 2px; }
.contact-card p { font-size: 10px; color: var(--muted); line-height: 1.8; }
.contact-card a { color: var(--gold-2); }
.form-card {
  padding: 22px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  background: var(--surface);
  margin-top: 18px;
}
.form-card h2 { font-size: 15px; margin-bottom: 4px; }
.form-card > p { font-size: 10.5px; color: var(--muted); margin-bottom: 16px; line-height: 1.9; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 11px; }
.form-grid .field { margin-bottom: 0; }
.form-grid .field--full { grid-column: 1 / -1; }
.form-card textarea {
  width: 100%;
  min-height: 110px;
  padding: 11px 12px;
  border-radius: 9px;
  border: 1px solid var(--line-2);
  background: rgba(0, 0, 0, 0.3);
  color: var(--text);
  font: inherit;
  font-size: 11.5px;
  resize: vertical;
}
.form-card textarea:focus { outline: 0; border-color: var(--gold-3); box-shadow: 0 0 0 3px rgba(232, 197, 106, 0.07); }
.form-note { font-size: 9px; color: var(--dim); margin-top: 10px; line-height: 1.8; }
.info-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 15px; }
.faq-list { display: flex; flex-direction: column; gap: 8px; }
.faq-item {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  overflow: hidden;
}
.faq-item summary {
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 14px 16px;
  cursor: pointer;
  font-size: 11.5px;
  color: var(--text-2);
  transition: 0.2s;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary:hover { color: var(--gold-1); background: rgba(232, 197, 106, 0.03); }
.faq-item summary .ic { font-size: 15px; color: var(--gold-2); transition: transform 0.25s; }
.faq-item[open] summary { color: var(--gold-1); }
.faq-item[open] summary .ic { transform: rotate(180deg); }
.faq-item .faq-body { padding: 0 16px 14px; font-size: 10.5px; line-height: 2; color: var(--muted); }
.services-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.service-tile {
  padding: 20px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  background: var(--surface);
  transition: 0.3s var(--ease);
}
.service-tile:hover { border-color: var(--gold-line); transform: translateY(-3px); }
.service-tile .st-icon {
  width: 42px;
  height: 42px;
  border-radius: 11px;
  display: grid;
  place-items: center;
  background: var(--gold-soft);
  border: 1px solid var(--gold-line);
  color: var(--gold-2);
  margin-bottom: 12px;
}
.service-tile .st-icon .ic { font-size: 21px; }
.service-tile h3 { font-size: 12.5px; margin-bottom: 5px; }
.service-tile p { font-size: 10px; line-height: 1.95; color: var(--muted); margin-bottom: 9px; }
.service-tile ul { display: flex; flex-direction: column; gap: 4px; }
.service-tile li { font-size: 9.5px; color: var(--text-2); display: flex; gap: 5px; }
.service-tile li::before { content: "•"; color: var(--gold-2); }
.legal-body h2 { font-size: 15px; margin: 24px 0 8px; color: var(--text); }
.legal-body p,
.legal-body li { font-size: 11.5px; line-height: 2.1; color: var(--muted); }
.legal-body ul { padding-inline-start: 18px; margin: 8px 0 14px; display: flex; flex-direction: column; gap: 6px; }
.legal-body .callout {
  padding: 13px 15px;
  border-radius: 10px;
  border: 1px solid var(--gold-line);
  background: var(--gold-soft);
  font-size: 10.5px;
  line-height: 1.95;
  color: var(--text-2);
  margin: 16px 0;
}

/* ---------- public toast ---------- */
.public-toasts {
  position: fixed;
  bottom: 20px;
  inset-inline-start: 20px;
  z-index: 300;
  display: flex;
  flex-direction: column;
  gap: 7px;
  max-width: min(360px, calc(100vw - 40px));
}
.public-toast {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  padding: 11px 13px;
  border-radius: 10px;
  border: 1px solid var(--line-2);
  background: rgba(19, 19, 25, 0.97);
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
  transform: translateY(10px);
  opacity: 0;
  transition: 0.25s var(--ease);
}
.public-toast.show { transform: none; opacity: 1; }
.public-toast .pt-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--gold-2);
  margin-top: 6px;
  flex: none;
}
.public-toast.success .pt-dot { background: var(--ok); }
.public-toast.warn .pt-dot { background: var(--warn); }
.public-toast strong { display: block; font-size: 10px; color: var(--text); margin-bottom: 1px; }
.public-toast span { font-size: 9.5px; color: var(--muted); line-height: 1.8; }

/* ---------- small utilities ---------- */
.mono {
  direction: ltr;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.03em;
}
.nowrap { white-space: nowrap; }
.mt-0 { margin-top: 0 !important; }
.center { text-align: center; }
.hidden { display: none !important; }

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 1080px) {
  .article-layout { grid-template-columns: minmax(0, 1fr) 270px; }
  .info-layout { grid-template-columns: minmax(0, 1fr) 280px; }
  .quick-grid,
  .quick-grid--six { grid-template-columns: repeat(2, 1fr); }
  .glossary-grid { grid-template-columns: repeat(2, 1fr); }
  .home-tools { grid-template-columns: 1fr; }
}

@media (max-width: 900px) {
  .article-layout,
  .info-layout { grid-template-columns: 1fr; }
  .article-side,
  .info-side { position: static; display: grid; grid-template-columns: 1fr 1fr; align-items: start; }
  .side-panel--toc { grid-row: span 2; }
  .calc-layout { grid-template-columns: 1fr; }
  .calc-output { min-height: 210px; }
  .calc-tabs { grid-template-columns: 1fr 1fr; }
  .article-grid { grid-template-columns: repeat(2, 1fr); }
  .article-grid--two { grid-template-columns: 1fr 1fr; }
  .services-grid { grid-template-columns: 1fr; }
}

@media (max-width: 700px) {
  .page-main { padding-top: calc(var(--header-h) + 14px); }
  .page-hero { border-radius: 20px; padding: 24px 18px; }
  .page-hero h1 { font-size: 1.55rem; }
  .page-lead { font-size: 12px; }
  .article-grid,
  .article-grid--two { grid-template-columns: 1fr; }
  .article-side,
  .info-side { grid-template-columns: 1fr; }
  .side-panel--toc { grid-row: auto; }
  .glossary-grid { grid-template-columns: 1fr; }
  .calc-form,
  .calc-output { padding: 16px; }
  .calc-notes { grid-template-columns: 1fr; }
  .result-grid--three { grid-template-columns: 1fr 1fr; }
  .result-grid--three > div:last-child { grid-column: span 2; }
  .contact-grid { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .stats-row { grid-template-columns: 1fr 1fr; }
  .stats-row > div:last-child { grid-column: span 2; }
  .article-cta { padding: 17px; }
  .article-cta .btn { width: 100%; }
  .calc-tab { font-size: 9.5px; padding: 10px 5px; }
  .calc-tab .ic { font-size: 16px; }
  .quick-grid { grid-template-columns: 1fr 1fr; }
  .quick-card { padding: 15px 13px; }
  .filter-meta { flex-direction: column; align-items: flex-start; gap: 4px; }
}

@media (max-width: 480px) {
  .calc-tabs { grid-template-columns: 1fr 1fr; gap: 6px; }
  .calc-tab { flex-direction: column; gap: 3px; }
  .field-row { grid-template-columns: 1fr; }
  .weight-row { grid-template-columns: 16px 1fr 1fr 26px; padding: 6px; gap: 5px; }
  .mini-field input { height: 33px; }
  .result-grid { grid-template-columns: 1fr; }
  .result-grid--three { grid-template-columns: 1fr; }
  .result-grid--three > div:last-child { grid-column: auto; }
  .result-detail-pair { grid-template-columns: 1fr; }
  .public-toasts { inset-inline: 12px; bottom: 12px; max-width: none; }
  .quick-grid { grid-template-columns: 1fr; }
  .stats-row { grid-template-columns: 1fr; }
  .stats-row > div:last-child { grid-column: auto; }
  .article-header h1 { font-size: 1.4rem; }
  .article-hero img { aspect-ratio: 16 / 10; }
}

@media (prefers-reduced-motion: reduce) {
  .article-card,
  .quick-card,
  .term-card,
  .article-card-media img,
  .calc-panel,
  .calc-result { transition: none !important; animation: none !important; }
}

/* ---------- print article / calculator ---------- */
@media print {
  body.content-page {
    background: #fff !important;
    color: #111 !important;
  }
  body.content-page .site-header,
  body.content-page .site-footer,
  body.content-page .article-side,
  body.content-page .article-cta,
  body.content-page .related-articles,
  body.content-page .public-toasts,
  body.content-page .filter-bar,
  body.content-page .page-actions,
  body.content-page .calc-tabs,
  body.content-page .calc-notes,
  body.content-page .calc-form .form-actions,
  body.content-page .calc-form .calc-samples { display: none !important; }
  body.content-page .article-layout,
  body.content-page .calc-layout { display: block !important; }
  body.content-page .article-hero,
  body.content-page .takeaways,
  body.content-page .calc-output { break-inside: avoid; }
  body.content-page .prose,
  body.content-page .article-section p { color: #222 !important; }
  body.content-page .article-section h2 { color: #111 !important; }
  body.content-page .article-header h1 { color: #111 !important; }
  body.content-page .article-deck { color: #333 !important; }
}

/* ---------- search-first homepage hero ---------- */
.hero--search-first .hero-inner {
  grid-template-columns: minmax(0, 1.02fr) minmax(0, 0.98fr);
  align-items: start;
}
.hero--search-first .query-wrap {
  margin-inline: 0 auto;
  max-width: 470px;
}
.hero--search-first .hero-copy {
  max-width: 520px;
  margin-inline-start: auto;
}
.hero--search-first .hero-lead {
  max-width: 470px;
}
.hero-basis {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 11px;
  border: 1px solid var(--gold-line);
  border-radius: 99px;
  background: var(--gold-soft);
  color: var(--gold-1);
  font-size: 10.5px;
  font-weight: 500;
}
.hero-basis .ic { font-size: 14px; color: var(--gold-2); }

@media (max-width: 980px) {
  .hero--search-first .hero-inner { grid-template-columns: 1fr; gap: 30px; }
  .hero--search-first .query-wrap { margin-inline: auto; }
  .hero--search-first .hero-copy { margin-inline: auto; }
  .hero--search-first .hero-lead { margin-inline: auto; }
  .hero-basis { margin-inline: auto; }
}
