/* Masheen website: tools, articles and their hubs (T64). Loaded after site.css
   on those pages only, so the landing's first view stays as it was. Same four
   materials, same tokens; no colour literals, no hover effects. */

/* ---------------------------------------------------------------- the app strip */
.strip { background: var(--iron-bar); border-bottom: 1px solid var(--hairline); }
.strip-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 60px; padding-block: 8px; }
.strip-app { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; min-width: 0; text-decoration: none; }
.strip-app svg { width: 24px; height: 24px; flex: none; }
.strip-name { font: 700 19px/1 var(--f-display); letter-spacing: 1px; text-transform: uppercase; }
.strip-line { display: none; color: var(--chalk-dim); font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (min-width: 760px) { .strip-line { display: inline; } }
.strip-stores { display: flex; gap: 8px; flex: none; }
.strip-store { display: inline-flex; flex-direction: column; justify-content: center; min-height: 44px; padding: 4px 12px; border-radius: var(--r-button); border: 1px dashed var(--steel-light); line-height: 1.15; text-decoration: none; }
.strip-store span { font-size: 10.5px; letter-spacing: .2px; white-space: nowrap; color: var(--chalk-dim); }
.strip-store b { font: 700 15px/1.1 var(--f-display); letter-spacing: .5px; text-transform: uppercase; }
.strip-store.is-soon { cursor: default; }
.strip-store.is-soon b { color: var(--chalk-dim); }
a.strip-store { background: var(--chalk); color: var(--on-chalk); border: 1px solid var(--chalk); }
a.strip-store span { color: inherit; opacity: .74; }

/* ---------------------------------------------------------------- breadcrumbs */
.crumbs ol { list-style: none; margin: 0 0 12px; padding: 0; display: flex; flex-wrap: wrap; align-items: center; font-size: 13px; color: var(--chalk-dim); }
.crumbs li { display: inline-flex; align-items: center; min-width: 0; }
.crumbs li + li::before { content: "/"; margin: 0 8px; color: var(--steel-icon); }
.crumbs a { display: inline-flex; align-items: center; min-height: 44px; color: var(--chalk-dim); text-decoration: none; }
@media (max-width: 599px) { .crumbs li:nth-child(n+3):last-child { display: none; } }
.crumbs [aria-current] { display: inline-block; max-width: 30ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--chalk); }

/* ---------------------------------------------------------------- hubs */
.hub-head, .tool-head, .art-head { padding-top: clamp(12px, 3vw, 32px); }
.hub-head .h1 { font-size: clamp(72px, 19vw, 216px); line-height: .84; letter-spacing: 0; }
.hub-head .lead { margin-top: clamp(18px, 3vw, 28px); max-width: 31em; }
/* the hubs' one line to the glossary, and a link to a term from a tool or an article (T69) */
.hub-also { margin-top: 12px; max-width: 36em; font-size: 15px; color: var(--chalk-dim); }
.hub-also a { color: var(--chalk); font-weight: 600; text-underline-offset: 3px; text-decoration-color: var(--steel-light); }
a.gl { text-decoration: underline; text-decoration-style: dotted; text-decoration-color: var(--steel-icon); text-decoration-thickness: 1.5px; text-underline-offset: 3px; }

/* a bar loaded with one plate per item, running off the right edge */
.loadbar { position: relative; height: 104px; margin-top: clamp(28px, 5vw, 56px); overflow: hidden; }
.loadbar::before { content: ""; position: absolute; left: 0; right: 0; top: 50%; height: 8px; margin-top: -4px; background: var(--steel); }
.lb-inner { position: relative; display: flex; align-items: center; gap: 4px; height: 100%; padding-left: max(var(--gutter), calc((100vw - var(--max)) / 2)); }
.lb-collar { flex: none; width: 9px; height: 26px; border-radius: 2px; background: var(--steel-light); }
.lb-collar.lb-end { margin-left: 4px; background: var(--collar); }
.lb-plate { flex: none; width: 26px; border-radius: 6px; background: var(--chalk); box-shadow: inset 0 1px 0 var(--plate-hl); transition: background-color 360ms ease; }
.lb-a { height: 96px; } .lb-b { height: 78px; } .lb-c { height: 58px; } .lb-d { height: 40px; width: 18px; }
.lb-plate.ember-able.is-live { background: var(--ember); box-shadow: 0 0 0 4px var(--ember-glow); }

.hub-row { border-top: 1px solid var(--hairline); padding-block: clamp(48px, 8vw, 104px); }
.hub-rows .hub-row:first-child { border-top: 0; }
.hub-row-grid { display: grid; gap: 36px; }
.hub-copy { display: grid; gap: 16px; justify-items: start; align-content: start; }
.hub-copy .h2 a { text-decoration: none; }
.hub-copy .body-dim { font-size: 18px; }
.hub-n { font: 700 clamp(64px, 11vw, 132px)/.8 var(--f-display); color: var(--steel-light); }
.hub-art { display: block; text-decoration: none; }
@media (min-width: 1000px) {
  .hub-row-grid { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); column-gap: 72px; align-items: center; }
  .hub-row.flip .hub-copy { order: 2; }
}
.hub-empty { display: grid; gap: 32px; justify-items: start; padding-block: clamp(40px, 8vw, 88px) clamp(72px, 12vw, 140px); }
.hub-empty .pm-stage { width: 100%; height: auto; }
.hub-empty .pm-stage svg { width: 100%; height: auto; overflow: visible; }

/* pillar bands on /articles, and a pillar page */
.pillar-band { border-top: 1px solid var(--hairline); padding-block: clamp(48px, 8vw, 96px); }
.loadbar + .pillar-band { border-top: 0; }
.pillar-grid { display: grid; gap: 28px; }
.pillar-side { display: grid; gap: 14px; align-content: start; }
.pillar-side .h2 { font-size: clamp(38px, 5.2vw, 62px); }
.pillar-side a { text-decoration: none; }
@media (min-width: 1000px) {
  .pillar-grid { grid-template-columns: minmax(0, 4fr) minmax(0, 7fr); column-gap: 72px; }
  .pillar-side { position: sticky; top: 96px; align-self: start; }
}
.pillar-intro { display: grid; gap: 14px; margin-top: clamp(20px, 3vw, 32px); max-width: 40em; font-size: 18px; line-height: 1.6; }
.pillar-intro p + p { color: var(--chalk-dim); }
.pillar-list { padding-block: clamp(24px, 4vw, 48px) clamp(56px, 9vw, 104px); }

/* article rows: a numeral, the title in display type, one line, a date */
.arows { border-top: 1px solid var(--hairline); }
.arow { display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: 6px 12px; align-items: start; padding: 20px 0; border-bottom: 1px solid var(--hairline); text-decoration: none; }
.arow-n { font: 700 24px/1.2 var(--f-display); color: var(--chalk-dim); }
.arow-title { display: block; font: 700 clamp(24px, 3.4vw, 32px)/1.04 var(--f-display); letter-spacing: .4px; text-transform: uppercase; }
.arow-desc { display: block; margin-top: 8px; max-width: 60ch; color: var(--chalk-dim); font-size: 15px; line-height: 1.5; }
.arow-meta { grid-column: 2; font-size: 13px; color: var(--chalk-dim); }
@media (min-width: 760px) {
  .arow { grid-template-columns: 52px minmax(0, 1fr) auto; column-gap: 20px; }
  .arow-meta { grid-column: 3; padding-top: 6px; text-align: right; white-space: nowrap; }
  .arow-meta span { display: block; }
}

/* ---------------------------------------------------------------- the reading column (articles, tool explainers) */
.reading { padding-block: clamp(40px, 6vw, 72px) clamp(56px, 9vw, 104px); }
.prose-a { max-width: 68ch; font-size: 17px; line-height: 1.7; overflow-wrap: break-word; }
@media (min-width: 600px) { .prose-a { font-size: 18px; } }
.prose-a > * + * { margin-top: 1.1em; }
.art-body > p:first-child { font-size: 1.16em; line-height: 1.55; }
.prose-a h2 { margin-top: 1.9em; padding-top: .9em; border-top: 1px solid var(--hairline); font: 700 clamp(30px, 4.6vw, 40px)/1 var(--f-display); letter-spacing: .5px; text-transform: uppercase; scroll-margin-top: 84px; }
.prose-a > h2:first-child { margin-top: 0; padding-top: 0; border-top: 0; }
.prose-a h3 { margin-top: 1.8em; font: 600 19px/1.35 var(--f-body); }
.prose-a h2 + *, .prose-a h3 + * { margin-top: .65em; }
.prose-a a:not(.btn):not(.tcard) { color: var(--chalk); text-decoration: underline; text-decoration-color: var(--steel-light); text-decoration-thickness: 1.5px; text-underline-offset: 3px; }
.prose-a strong { font-weight: 600; }
.prose-a ul, .prose-a ol { padding-left: 1.25em; margin-bottom: 0; }
.prose-a li + li { margin-top: .45em; }
.prose-a ul li::marker { color: var(--steel-icon); }
.prose-a ol li::marker { font-family: var(--f-display); font-weight: 700; color: var(--chalk-dim); }
.prose-a code { padding: 1px 6px; border-radius: 6px; background: var(--iron-raised); font: 500 .9em ui-monospace, SFMono-Regular, Menlo, monospace; }
.prose-a img { margin-inline: auto; border-radius: var(--r-surface); }

/* tables: ruled like a log, numbers in columns; scroll in their own box on a phone */
.tbl-wrap { margin-block: 1.7em; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.tbl { width: 100%; border-collapse: collapse; font-size: 15.5px; line-height: 1.45; font-variant-numeric: tabular-nums lining-nums; }
.tbl th { padding: 0 18px 10px 0; border-bottom: 1px solid var(--steel-light); text-align: left; vertical-align: bottom; font: 600 12px/1.3 var(--f-body); letter-spacing: 1.2px; text-transform: uppercase; color: var(--chalk-dim); }
.tbl td { padding: 13px 18px 13px 0; border-bottom: 1px solid var(--hairline); vertical-align: top; }
.tbl th:last-child, .tbl td:last-child { padding-right: 0; }
.tbl td:first-child { font-weight: 600; }
.tbl tbody tr:last-child td { border-bottom-color: var(--steel-light); }

/* callout: one idea set apart on a raised surface, with a steel collar */
.callout { position: relative; margin-block: 1.7em; margin-inline: 0; padding: 20px 22px 20px 30px; border-radius: var(--r-surface); background: var(--iron-plate); }
.callout::before { content: ""; position: absolute; left: 12px; top: 20px; bottom: 20px; width: 5px; border-radius: 3px; background: var(--steel-light); }
.callout > * + * { margin-top: .7em; }
.callout > p:first-child > strong:first-child { display: block; margin-bottom: 6px; font: 600 12px/1.3 var(--f-body); letter-spacing: 1.4px; text-transform: uppercase; color: var(--chalk-dim); }

/* a drawn bar in the text */
.fig-bar { margin: 1.9em 0; }
.fig-stage { padding: 14px 0 4px; }
.fig-stage svg { width: 100%; height: auto; overflow: visible; }
.fig-bar figcaption { margin-top: 12px; font-size: 14px; line-height: 1.5; color: var(--chalk-dim); }
.fig-bar figcaption b { color: var(--chalk); font-weight: 600; }

/* ---------------------------------------------------------------- article page */
.art-head { padding-bottom: clamp(24px, 4vw, 40px); }
.art-head .overline a { color: inherit; text-decoration: none; }
.art-head .h1 { margin-top: 12px; max-width: 15em; font-size: clamp(40px, 7.6vw, 84px); line-height: .94; }
.byline { display: flex; align-items: center; gap: 12px; margin-top: 24px; font-size: 15px; }
.byline-lg { margin: 0 0 4px; }
.by-tile { flex: none; display: grid; place-items: center; width: 42px; height: 42px; border-radius: 10px; background: var(--iron-raised); font: 700 18px/1 var(--f-display); letter-spacing: .4px; }
.by-text { display: grid; gap: 2px; }
.by-text a { text-underline-offset: 3px; text-decoration-color: var(--steel-light); font-weight: 600; }
.by-dates { color: var(--chalk-dim); font-size: 13px; }
.art-grid { display: grid; gap: 40px; padding-block: clamp(28px, 5vw, 48px) clamp(56px, 9vw, 104px); border-top: 1px solid var(--hairline); }
.art-main { min-width: 0; }
.art-rail { display: none; }
@media (min-width: 1100px) {
  .art-grid { grid-template-columns: minmax(0, 720px) 250px; justify-content: space-between; column-gap: 72px; }
  .art-rail { display: block; position: sticky; top: 96px; align-self: start; }
}
.art-rail ol { list-style: none; margin: 14px 0 0; padding: 0; border-left: 1px solid var(--hairline); }
.art-rail a { display: block; padding: 8px 0 8px 16px; color: var(--chalk-dim); text-decoration: none; font-size: 14px; line-height: 1.35; }

.tblock { display: grid; gap: 18px; max-width: 68ch; margin-block: 2.2em; padding: 22px; border-radius: var(--r-surface); background: var(--iron-plate); }
.tblock-art { padding: 8px 0 2px; }
.tblock-row { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px; }
.tblock-name { margin-top: 6px; font: 700 30px/1 var(--f-display); letter-spacing: .5px; text-transform: uppercase; }
.tblock-line { margin-top: 6px; color: var(--chalk-dim); font-size: 15px; line-height: 1.5; }

.qlist, .sources, .deeper { max-width: 68ch; margin-top: clamp(40px, 6vw, 64px); padding-top: 28px; border-top: 1px solid var(--hairline); }
.qlist > h2, .sources > h2, .deeper > h2 { font: 700 clamp(30px, 4.6vw, 40px)/1 var(--f-display); letter-spacing: .5px; text-transform: uppercase; scroll-margin-top: 84px; }
.q { padding: 20px 0; border-bottom: 1px solid var(--hairline); }
.q h3 { font: 600 18px/1.35 var(--f-body); }
.q-a { margin-top: 8px; color: var(--chalk-dim); }
.q-a p + p { margin-top: 10px; }
.q-a a { color: var(--chalk); text-underline-offset: 3px; text-decoration-color: var(--steel-light); }
.deeper .arows { margin-top: 18px; }
.sources ol { list-style: none; margin: 14px 0 0; padding: 0; counter-reset: src; }
.sources li { position: relative; padding: 10px 0 10px 36px; counter-increment: src; font-size: 15px; line-height: 1.45; overflow-wrap: anywhere; }
.sources li::before { content: counter(src); position: absolute; left: 0; top: 9px; font: 700 18px/1.3 var(--f-display); color: var(--chalk-dim); }
.sources a { text-underline-offset: 3px; text-decoration-color: var(--steel-light); }
.src-read { display: block; margin-top: 2px; font-size: 13px; color: var(--chalk-dim); }
.art-policy { max-width: 68ch; margin-top: 28px; font-size: 14px; color: var(--chalk-dim); }
.art-policy a { color: var(--chalk); text-underline-offset: 3px; text-decoration-color: var(--steel-light); }
.pref-src { margin-top: 20px; }
.read-next, .more-tools { border-top: 1px solid var(--hairline); padding-block: clamp(40px, 7vw, 80px); }
.read-next .reading { padding-block: 0; }
.read-next .h3, .more-tools .h3 { margin-bottom: 22px; }
.read-next .arows { max-width: 68ch; }

/* ---------------------------------------------------------------- tool page chrome */
.tool-head .h1 { font-size: clamp(44px, 9vw, 96px); }
.answer { margin-top: 20px; max-width: 38em; }
.tool { margin-top: clamp(28px, 5vw, 48px); }
.tool-cta { display: grid; gap: 10px; max-width: 760px; margin-top: clamp(32px, 5vw, 56px); padding: 24px; border-radius: var(--r-surface); background: var(--chalk); color: var(--on-chalk); }
.tool-cta .overline { color: inherit; opacity: .7; }
.tool-cta-line { font: 700 clamp(24px, 3.6vw, 32px)/1.08 var(--f-display); letter-spacing: .3px; }
.tool-cta .meta { color: inherit; opacity: .82; font-size: 15px; }
.tool-cta a { color: inherit; font-weight: 600; text-underline-offset: 3px; }
@media (min-width: 600px) { .tool-cta { padding: 32px; } }

/* parts a tool may use */
.tool-panel { padding: 20px; border-radius: var(--r-surface); background: var(--iron-plate); }
@media (min-width: 600px) { .tool-panel { padding: 28px; } }
.tool-controls { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 28px; }
.tool-out { font: 700 clamp(28px, 5vw, 44px)/1.05 var(--f-display); letter-spacing: .3px; }
.tool-note { margin-top: 8px; color: var(--chalk-dim); font-size: 14px; }
.checks { display: flex; flex-wrap: wrap; gap: 8px; }
.check { position: relative; display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 14px 0 12px; border-radius: var(--r-button); background: var(--iron-raised); font-weight: 600; font-size: 15px; cursor: pointer; }
.check input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.check i { flex: none; width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--steel-light); }
.check:has(input:checked) { background: var(--chalk); color: var(--on-chalk); }
.check:has(input:checked) i { background: currentColor; border-color: currentColor; }
.check:has(input:focus-visible) { outline: 2px solid var(--chalk); outline-offset: 3px; }
.link-row { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; font-weight: 600; text-underline-offset: 3px; text-decoration-color: var(--steel-light); }
