/* Calc89 website: layout for the subpages (commands, guides, compare).
   Loaded after style.css; reuses its variables, header, footer, badges. */

.page { padding: 40px var(--gutter) 96px; }
.page-inner { max-width: 880px; margin: 0 auto; }
.page-inner--wide { max-width: 1100px; }

.crumbs { margin: 0 0 20px; font-family: var(--font-mono); font-size: 13px; letter-spacing: 0.02em; }
.crumbs ol { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 0; color: var(--text-3); }
.crumbs li + li::before { content: "/"; margin: 0 8px; color: var(--text-4); }
.crumbs a { color: var(--text-2); text-decoration: none; }
.crumbs a:hover { color: var(--brand); }

.page-head { display: flex; flex-direction: column; gap: 16px; margin-bottom: 36px; }
.page-head .h1 { font-size: clamp(32px, 6vw, 56px); line-height: 1.02; letter-spacing: -0.03em; margin: 0; }
.page-head .lead { font-size: 19px; line-height: 1.55; color: var(--text-2); max-width: 40em; margin: 0; }

.prose { font-size: 17px; line-height: 1.65; color: var(--text-2); }
.prose h2 { font-family: var(--font-head); font-weight: 800; font-size: clamp(24px, 3.6vw, 32px); letter-spacing: -0.02em; line-height: 1.1; color: var(--text); margin: 48px 0 14px; }
.prose h3 { font-family: var(--font-head); font-weight: 700; font-size: 20px; color: var(--text); margin: 32px 0 10px; }
.prose p { margin: 0 0 16px; }
.prose ul, .prose ol { margin: 0 0 18px; padding-left: 22px; }
.prose li { margin-bottom: 6px; }
.prose a { color: var(--text); text-decoration-color: var(--brand); text-underline-offset: 4px; }
.prose a:hover { color: var(--brand); }
.prose code, .mono { font-family: var(--font-mono); font-size: 0.94em; }
.prose sup { font-size: 0.68em; line-height: 0; vertical-align: 0.55em; }

/* Calculator-style display box (same look as the examples figure on the home page) */
.display-box { margin: 20px 0 24px; border-radius: 18px; padding: 10px; background: var(--metal); box-shadow: 0 20px 50px rgba(0, 0, 0, .45); }
.display-box .bezel { background: #1b1c1f; border-radius: 12px; padding: 7px; }
.display-box .screen { background: var(--display); color: #16181c; border-radius: 7px; overflow: hidden; }
.display-box table { width: 100%; border-collapse: collapse; table-layout: fixed; }
.display-box th { font-family: var(--font-mono); font-weight: 600; font-size: 12px; letter-spacing: 0.06em; text-transform: uppercase; color: #4b4e55; text-align: left; padding: 10px 14px 6px; border-bottom: 1px solid #c6cacf; }
.display-box th:last-child { text-align: right; }
.display-box td { padding: 10px 14px; vertical-align: middle; overflow-wrap: anywhere; border-bottom: 1px solid #c6cacf; }
.display-box tr:last-child td { border-bottom: 0; }
.display-box td:first-child { font-family: var(--font-mono); font-size: 14.5px; color: #4b4e55; }
.display-box td:last-child { text-align: right; font-weight: 500; font-size: 17px; color: #16181c; }
.display-box sup { font-size: 0.68em; line-height: 0; vertical-align: 0.55em; }

/* Keystroke chips */
.keys { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 8px 0 18px; }
.keys kbd { font-family: var(--font-mono); font-size: 13px; font-weight: 600; color: var(--text); background: #3a3c41; border-radius: 6px; padding: 5px 9px; box-shadow: inset 0 -2px 0 rgba(0, 0, 0, .35); white-space: nowrap; }
.keys kbd.k-2nd { background: #3f86e0; color: #fff; }
.keys kbd.k-diamond { background: #36a862; color: #fff; }
.keys kbd.k-alpha { background: #e6e7ea; color: #111; }
.keys .then { color: var(--text-4); font-family: var(--font-mono); font-size: 12px; }

/* Syntax line */
.syntax { font-family: var(--font-mono); font-size: 16px; color: var(--text); background: var(--bg-card); border: 1px solid var(--grid-line); border-radius: 10px; padding: 12px 14px; margin: 0 0 18px; overflow-wrap: anywhere; }

/* Fact rows (label / value) */
.facts { display: grid; grid-template-columns: max-content 1fr; gap: 8px 18px; margin: 0 0 22px; font-size: 15px; }
.facts dt { font-family: var(--font-mono); font-size: 12.5px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-3); padding-top: 3px; }
.facts dd { margin: 0; color: var(--text-2); }

/* Card lists (command index, guide index, related) */
.card-list { list-style: none; margin: 0 0 32px; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr)); gap: 1px; background: var(--grid-line); border: 1px solid var(--grid-line); border-radius: 16px; overflow: hidden; }
.card-list li { background: var(--bg-card); }
.card-list a { display: flex; flex-direction: column; gap: 4px; padding: 16px 18px; min-height: 64px; text-decoration: none; color: var(--text); }
.card-list a:hover { background: #17181c; color: var(--text); }
.card-list .name { font-family: var(--font-mono); font-weight: 600; font-size: 15px; }
.card-list .sub { font-size: 13.5px; color: var(--text-3); line-height: 1.4; }
.card-list .title { font-family: var(--font-head); font-weight: 700; font-size: 18px; letter-spacing: -0.01em; }

/* Store call to action at the end of a page */
.cta-box { margin: 56px 0 0; padding: 28px; border: 1px solid var(--grid-line); border-radius: 18px; background: var(--bg-card); display: flex; flex-direction: column; gap: 14px; }
.cta-box .cta-title { font-family: var(--font-head); font-weight: 800; font-size: 24px; letter-spacing: -0.02em; margin: 0; color: var(--text); }
.cta-box p { margin: 0; color: var(--text-2); }

/* Wide comparison table on subpages */
.page .table-scroll { margin: 20px 0 28px; }

@media (max-width: 639.98px) {
  .page { padding-top: 24px; padding-bottom: 64px; }
  .page-head .lead { font-size: 17px; }
  .prose { font-size: 16px; }
  .facts { grid-template-columns: 1fr; gap: 2px 0; }
  .facts dd { margin-bottom: 10px; }
  .cta-box { padding: 20px; }
}

/* ---------- Guides (guide-*) and comparison page (cmp-*) ---------- */
.mat .mrow.guide-c1 { grid-template-columns: auto; }
.mat .mrow.guide-c2 { grid-template-columns: repeat(2, auto); }
.mat .mrow.guide-c4 { grid-template-columns: repeat(4, auto); }
.display-box .mat { font-size: 15px; }
.prose .guide-faq { margin: 8px 0 24px; }
.prose .guide-faq h3 { margin: 0; font-size: 19px; }
.prose .guide-faq summary { padding: 20px 0; }
.prose .guide-faq details > p { margin: 0; padding: 0 0 22px; font-size: 16px; }
.guide-note { font-size: 14px; color: var(--text-3); margin-top: 28px; }
.guide-more { margin: 32px 0 0; font-family: var(--font-mono); font-size: 13px; color: var(--text-4); }
.guide-more a { color: var(--text-2); text-underline-offset: 4px; }
.guide-list { margin-bottom: 28px; }
.guide-list a { min-height: 120px; gap: 8px; padding: 20px 22px; }
.prose .guide-keytable { margin: 16px 0 24px; }
.guide-keytable .compare-table { min-width: 0; font-size: 15px; }
.guide-keytable .compare-table th, .guide-keytable .compare-table td { padding: 8px 16px; vertical-align: middle; }
.guide-keytable .compare-table thead th { font-size: 14px; font-family: var(--font-mono); padding: 10px 16px; }
.guide-keytable .keys { margin: 0; }
.cmp-body > h2:first-child { margin-top: 0; }
.prose .cmp-picks { margin: 20px 0 8px; }
.prose .cmp-picks h3 { margin: 0; font-size: 21px; }
.prose .cmp-picks p { margin: 0; font-size: 16px; }
.cmp-note { font-size: 15px; color: var(--text-3); }
.prose .cmp-keylist { list-style: none; padding: 0; margin: 12px 0 20px; display: flex; flex-direction: column; gap: 10px; }
.cmp-keylist li { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 16px; margin: 0; }
.cmp-keylist .keys { margin: 0; min-width: 190px; }
.cmp-keylist li > span { font-size: 16px; }
.learn-cards { grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); }
.learn-cards .sub { font-size: 15px; }
.learn-cards a { min-height: 150px; gap: 8px; padding: 22px 24px; }
.learn-cards .more { margin-top: auto; font-family: var(--font-mono); font-size: 13px; color: var(--brand); }

/* Command reference: card lists inside .prose keep the card-list grid */
.prose .card-list.cmd-cards { padding-left: 0; margin: 0 0 32px; }
.prose .card-list.cmd-cards li { margin-bottom: 0; }

/* Command pages: the H1 is the command name itself in the mono font */
.cmd-h1 { font-family: var(--font-mono); font-weight: 600; letter-spacing: -0.01em; overflow-wrap: anywhere; }
