/* Public MDCAT pages (/mdcat/...): long-form documents on the edge theme. */
.g-crumbs { font-size: 12px; color: var(--text-3); display: flex; flex-wrap: wrap; gap: 4px; margin: 0; padding: 0; list-style: none; }
.g-crumbs li + li::before { content: "›"; margin-right: 4px; }
.g-crumbs a { color: var(--text-2); text-decoration: none; }
.g-crumbs a:hover { color: var(--accent-2); }

.g-head h1 { font-family: "Space Grotesk", system-ui, sans-serif; font-size: 23px; line-height: 1.2; letter-spacing: -0.02em; margin: 6px 0 8px; }
.g-head .g-lede { color: var(--text-2); font-size: 15px; line-height: 1.55; margin: 0; }
.g-meta { font-size: 12px; color: var(--text-3); margin-top: 8px; }

.g-prose { font-size: 15.5px; line-height: 1.65; color: var(--text); overflow-wrap: anywhere; }
.g-prose h2 { font-family: "Space Grotesk", system-ui, sans-serif; font-size: 19px; margin: 26px 0 8px; letter-spacing: -0.01em; }
.g-prose h3 { font-size: 16px; margin: 20px 0 6px; }
.g-prose p, .g-prose ul, .g-prose ol { margin: 0 0 12px; }
.g-prose ul, .g-prose ol { padding-left: 20px; }
.g-prose li + li { margin-top: 4px; }
.g-prose a { color: var(--accent-2); }
.g-prose strong { color: #fff; }
.g-note { background: var(--panel-2); border: 1px solid var(--line-2); border-left: 3px solid var(--warn); border-radius: var(--r); padding: 10px 12px; font-size: 14px; color: var(--text-2); }
.g-sources { font-size: 13px; color: var(--text-3); }
.g-sources a { color: var(--text-2); word-break: break-all; }

.g-table-wrap { overflow-x: auto; margin: 0 0 14px; border: 1px solid var(--line); border-radius: var(--r); }
.g-table { width: 100%; border-collapse: collapse; font-size: 14px; font-variant-numeric: tabular-nums; }
.g-table th, .g-table td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
.g-table th { background: var(--panel-2); color: var(--text-2); font-weight: 650; font-size: 12.5px; }
.g-table tr:last-child td { border-bottom: 0; }

.g-links { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.g-links a { display: flex; justify-content: space-between; gap: 10px; align-items: baseline; padding: 11px 12px; min-height: 44px;
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); color: var(--text); text-decoration: none; font-weight: 600; font-size: 14.5px; }
.g-links a:hover { border-color: var(--line-2); }
.g-links small { color: var(--text-3); font-weight: 600; font-size: 11.5px; white-space: nowrap; letter-spacing: 0.03em; }
.g-links.two { grid-template-columns: 1fr; }
@media (min-width: 600px) { .g-links.two { grid-template-columns: 1fr 1fr; } .g-head h1 { font-size: 28px; } }

.g-section { margin-top: 22px !important; }
.g-section > h2 { font-family: "Space Grotesk", system-ui, sans-serif; font-size: 18px; margin: 0 0 10px; }
.g-cta { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }

.g-q { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); padding: 12px 14px; box-shadow: 0 1px 0 var(--lit) inset; }
.g-q + .g-q { margin-top: 8px; }
.g-stem { margin: 0 0 8px; font-size: 15px; line-height: 1.55; font-weight: 550; overflow-wrap: anywhere; }
.g-n { color: var(--accent-2); font-family: "Space Grotesk", system-ui, sans-serif; font-weight: 700; margin-right: 4px; }
.g-opts { margin: 0; padding-left: 26px; font-size: 14.5px; line-height: 1.5; color: var(--text-2); overflow-wrap: anywhere; }
.g-opts li + li { margin-top: 3px; }
.g-q details { margin-top: 8px; font-size: 14px; }
.g-q summary { cursor: pointer; color: var(--accent-2); font-weight: 650; min-height: 32px; display: flex; align-items: center; }
.g-ans { color: var(--ok); font-weight: 650; margin: 4px 0; }
.g-sol { color: var(--text-2); margin: 0; line-height: 1.55; overflow-wrap: anywhere; }
.g-topic { font-size: 13px; letter-spacing: 0.04em; text-transform: uppercase; color: var(--text-3); margin: 18px 2px 8px; font-weight: 700; }
.katex { font-size: 1.02em; }

.g-units { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; counter-reset: u; }
.g-units li { counter-increment: u; background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); padding: 10px 12px 10px 40px; position: relative; }
.g-units li::before { content: counter(u); position: absolute; left: 12px; top: 10px; font-family: "Space Grotesk", system-ui, sans-serif; font-weight: 700; color: var(--accent-2); }
.g-units h3 { margin: 0; font-size: 15px; display: flex; justify-content: space-between; gap: 10px; align-items: baseline; }
.g-units h3 a { color: var(--text); text-decoration: underline; text-decoration-color: var(--line-2); text-underline-offset: 3px; }
.g-units small { color: var(--text-3); font-size: 11.5px; font-weight: 650; white-space: nowrap; text-transform: uppercase; letter-spacing: 0.04em; }
.g-units p { margin: 3px 0 0; font-size: 13px; color: var(--text-2); line-height: 1.45; }
.g-more { display: flex; flex-wrap: wrap; gap: 6px 16px; margin: 8px 2px 0; font-size: 14px; font-weight: 650; }
.g-more a { color: var(--accent-2); text-decoration: none; min-height: 32px; display: inline-flex; align-items: center; }
/* Tables inside written notes: scroll sideways rather than break words mid-way. */
.g-prose table { display: block; max-width: 100%; overflow-x: auto; border-collapse: collapse; margin: 0 0 14px; font-size: 14px; border: 1px solid var(--line); border-radius: var(--r); }
.g-prose th, .g-prose td { text-align: left; padding: 7px 10px; border-bottom: 1px solid var(--line); vertical-align: top; overflow-wrap: normal; word-break: normal; min-width: 88px; }
.g-prose th { background: var(--panel-2); color: var(--text-2); font-size: 12.5px; font-weight: 650; }
.g-prose tr:last-child td { border-bottom: 0; }
