/* Guides, pages about one need and legal documents. */

/* ---------- Heading of a document ---------- */
.doc-hero .lead { max-width: 62ch; }
.crumbs { display: flex; flex-wrap: wrap; justify-content: center; gap: .15em .55em; font-size: .86rem; color: var(--muted); }
.crumbs a { display: inline-block; margin-block: -11px; padding-block: 11px; color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--accent); text-decoration: underline; }
.crumbs [aria-current="page"] { color: var(--heading); font-weight: 600; }

/* ---------- Text of a document ---------- */
.doc { display: grid; grid-template-columns: minmax(0, 1fr); row-gap: 18px; font-size: 1.06rem; line-height: 1.76; }
.doc > * { min-width: 0; }
.doc p, .doc li { overflow-wrap: break-word; }
.doc strong { color: var(--heading); }
.doc a { color: var(--accent); text-decoration: underline; text-underline-offset: .16em; text-decoration-thickness: 1px; }
.doc-callout a { color: var(--accent-strong); }
.doc a:hover { text-decoration-thickness: 2px; }
.doc h2 { font-size: clamp(1.32rem, 1.14rem + .75vw, 1.7rem); line-height: 1.25; margin-top: clamp(20px, 2.4vw, 32px); scroll-margin-top: calc(var(--header-h) + 16px); }
.doc h2:first-child { margin-top: 0; }
.doc h3 { font-size: 1.1rem; line-height: 1.35; margin-top: 8px; }
.doc h2 + p, .doc h2 + ul, .doc h2 + ol, .doc h3 + p { margin-top: -6px; }

.doc-bullets, .doc-numbered { display: grid; gap: 9px; padding-left: 1.3em; }
.doc-bullets { list-style: disc; }
.doc-numbered { list-style: decimal; }
.doc-bullets li::marker { color: var(--accent); }
.doc-numbered li::marker { color: var(--accent); font-weight: 700; }

.doc-callout { display: grid; gap: 6px; padding: 18px 22px; border: 1px solid var(--border); border-left: 4px solid var(--accent-bg); border-radius: var(--radius); background: var(--accent-soft); }
.doc-callout strong { font-size: 1.04rem; line-height: 1.35; }
.doc-callout p { font-size: 1rem; line-height: 1.68; color: var(--text); }

/* ---------- Tables ---------- */
.doc-table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow-sm); }
.doc-table { width: 100%; border-collapse: collapse; font-size: .94rem; line-height: 1.5; font-variant-numeric: tabular-nums; }
.doc-table caption { caption-side: top; text-align: left; font-weight: 700; color: var(--heading); padding: 15px 18px 12px; line-height: 1.4; }
.doc-table th, .doc-table td { padding: 11px 16px; text-align: left; vertical-align: top; border-top: 1px solid var(--border); }
.doc-table thead th { font-size: .78rem; font-weight: 700; line-height: 1.35; color: var(--muted); background: var(--surface-2); border-top-color: var(--border); }
.doc-table tbody th { font-weight: 700; color: var(--heading); }
.doc-table .is-number { text-align: right; white-space: nowrap; }
.doc-table thead .is-number { white-space: normal; }

/* On a phone every row becomes a small card: the column's name beside its value. */
@media (max-width: 660px) {
    .doc { font-size: 1.02rem; line-height: 1.7; }
    .doc-table { font-size: .95rem; }
    .doc-table caption { padding: 14px 16px 10px; }
    .doc-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
    .doc-table, .doc-table tbody, .doc-table tr, .doc-table tbody th, .doc-table td { display: block; }
    .doc-table tbody tr { padding: 12px 16px; border-top: 1px solid var(--border); }
    .doc-table tbody th { padding: 0 0 6px; border-top: 0; }
    .doc-table td { display: flex; justify-content: space-between; gap: 16px; padding: 3px 0; border-top: 0; text-align: right; white-space: normal; }
    .doc-table td::before { content: attr(data-label); flex: 0 1 58%; text-align: left; color: var(--muted); font-size: .9em; }
    .doc-table td.is-number { white-space: normal; }
}

/* ---------- Closing notes of a document ---------- */
.doc-sources { display: grid; gap: 7px; padding-left: 1.2em; list-style: disc; font-size: .93rem; line-height: 1.55; }
.doc-sources li::marker { color: var(--muted); }
.doc-sources a { color: var(--muted); }
.doc-sources a:hover { color: var(--accent); }
.doc-updated { font-size: .86rem; margin-top: 6px; }

/* ---------- Lists of documents ---------- */
.doc-list-title { font-size: clamp(1.28rem, 1.1rem + .7vw, 1.6rem); margin: 8px 0 18px; }
.doc-grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); margin-bottom: clamp(30px, 4vw, 44px); }
.doc-grid:last-child { margin-bottom: 0; }
.doc-card { display: flex; flex-direction: column; gap: 8px; position: relative; padding: 22px 24px; }
.doc-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: rgba(26, 179, 148, .4); }
.doc-card .eyebrow { font-size: .76rem; }
.doc-card h3 { font-size: 1.12rem; line-height: 1.35; margin: 2px 0 0; }
.doc-card h3 a { color: var(--heading); text-decoration: none; }
.doc-card h3 a::after { content: ""; position: absolute; inset: 0; border-radius: var(--radius); }
.doc-card h3 a:focus-visible { outline: none; }
.doc-card h3 a:focus-visible::after { outline: 3px solid var(--focus); outline-offset: 2px; }
.doc-card:hover h3 a { color: var(--accent); }
.doc-card p:not(.eyebrow) { color: var(--muted); font-size: .97rem; line-height: 1.6; }
.doc-card-more { display: inline-flex; gap: .4em; align-items: center; margin-top: auto; padding-top: 6px; color: var(--accent); font-weight: 700; font-size: .92rem; text-decoration: none; }
.doc-card-more .icon { width: .95em; height: .95em; transition: transform .2s ease; }
.doc-card:hover .doc-card-more .icon { transform: translateX(3px); }

@media (prefers-reduced-motion: reduce) {
    .doc-card, .doc-card:hover { transform: none; }
    .doc-card:hover .doc-card-more .icon { transform: none; transition: none; }
}
