/* DraftingBase e-stamp pages. Uses the tokens and components in base.css; only what is new lives here. */

/* ---------- Hub head ---------- */
.es-hub-head { padding-bottom: clamp(40px, 5vw, 64px); }
.es-hub-head .db-kicker { justify-content: center; }
.es-hub-chips { justify-content: center; }

/* ---------- Limit finder (hub) ---------- */
.es-finder-out { font-size: .9688rem; color: var(--ink-soft); min-height: 3.1em; margin: 0; }
.es-finder-out strong { color: var(--ink); }
.es-finder-out.ok { color: #1F5C3A; }
.es-finder-out.ok strong { color: #17482D; }
.es-finder-out.no { color: #7A4A12; }
.es-finder-out.no strong { color: #5C380E; }
#es-pick-go[aria-disabled="true"] { background: var(--surface-deep); color: var(--ink-faint); pointer-events: none; }

/* ---------- State table (hub) ---------- */
.es-table th[scope="row"] { font-weight: 500; }
.es-table th[scope="row"] a { color: var(--ink); text-decoration: none; font-family: var(--font-display); font-size: 1.125rem; font-weight: 600; letter-spacing: -0.012em; }
.es-table th[scope="row"] a:hover { color: var(--navy); text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 1px; }
.es-table td.es-max { color: var(--ink); font-weight: 600; }
.es-table td.es-go { text-align: right; }
.es-table tbody tr { transition: background-color .2s var(--ease); }
.es-table tbody tr:hover { background: rgba(19,40,74,.025); }
.es-compare td:first-child { white-space: nowrap; }
.es-compare td[colspan] { color: var(--ink-soft); }

/* ---------- Limits card (State hero) ---------- */
.es-top { align-items: center; }
.es-card {
	width: min(420px, 100%); margin-left: auto; background: #fff; border-radius: 6px;
	padding: clamp(26px, 3vw, 36px); box-shadow: var(--shadow-paper); transform: rotate(1.2deg);
	border-top: 3px solid var(--accent);
}
.es-card-head { display: flex; justify-content: space-between; gap: 12px; font-family: var(--font-mono); font-size: .6875rem; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-faint); padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.es-card-label { font-size: .8125rem; color: var(--ink-faint); margin-top: 22px; }
.es-card-range { font-family: var(--font-display); font-weight: 600; font-size: clamp(2rem, 1.5rem + 1.8vw, 2.875rem); line-height: 1.05; letter-spacing: -0.03em; color: var(--ink); margin-top: 6px; display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 12px; }
.es-card-range span { font-family: var(--font-body); font-size: .9375rem; font-weight: 400; letter-spacing: 0; color: var(--ink-faint); }
.es-card-facts { margin: 22px 0 0; border-top: 1px solid var(--line-strong); }
.es-card-facts > div { display: flex; justify-content: space-between; gap: 16px; padding: 11px 0; border-bottom: 1px solid var(--line); font-size: .9375rem; }
.es-card-facts dt { color: var(--ink-faint); }
.es-card-facts dd { margin: 0; color: var(--ink); font-weight: 600; text-align: right; }
.es-card-foot { font-size: .75rem; line-height: 1.5; color: var(--ink-faint); margin-top: 16px; }

/* ---------- Order form ---------- */
.es-order { align-items: start; }
.es-form .es-step { margin-top: 20px; padding-top: 30px; border-top: 1px solid var(--line); }
.es-form .db-label-sm { margin-bottom: 8px; color: var(--accent); }
.es-help { font-size: .875rem; color: var(--ink-faint); margin: -10px 0 0; }
.es-help a { color: var(--navy); }
.es-help.bad { color: #9A2B1C; font-weight: 500; }
.es-help.good { color: #1F5C3A; }
.es-quick { display: flex; flex-wrap: wrap; gap: 8px; margin-top: -8px; }
.es-quick-btn { height: 36px; padding: 0 14px; border-radius: var(--r-pill); border: 1px solid var(--line-strong); background: #fff; font-size: .875rem; font-weight: 500; color: var(--ink); transition: background-color .2s var(--ease), border-color .2s var(--ease), color .2s; }
.es-quick-btn:hover { border-color: var(--navy); }
.es-quick-btn[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: #fff; }
.es-radio { border: 0; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 10px 24px; align-items: center; }
.es-radio legend { float: left; font-size: .875rem; font-weight: 600; color: var(--ink); margin-right: 24px; padding: 0; }
.es-radio label { display: inline-flex; align-items: center; gap: 8px; font-size: .9688rem; color: var(--ink); cursor: pointer; }
.es-radio input { width: 18px; height: 18px; accent-color: var(--navy); }
.db-input.es-invalid { border-color: #B33A2A; box-shadow: 0 0 0 4px rgba(179,58,42,.1); }
.es-error { margin: 0; }
.es-form[hidden], .es-form [hidden], .es-done[hidden], .es-error[hidden] { display: none; }
#es-submit[disabled] { opacity: .6; cursor: progress; }
.es-done-line { font-size: 1.0625rem; color: var(--ink); margin: 6px 0 22px; }
.es-done:focus { outline: none; }

/* ---------- Order summary ---------- */
.es-sum { margin: 4px 0 0; }
.es-sum > div { display: flex; justify-content: space-between; gap: 16px; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: .9375rem; }
.es-sum dt { color: var(--ink-faint); flex: none; }
.es-sum dd { margin: 0; color: var(--ink); font-weight: 500; text-align: right; overflow-wrap: anywhere; }
.es-sum .es-sum-total { border-bottom: 0; padding-top: 16px; align-items: baseline; }
.es-sum .es-sum-total dt { color: var(--ink); font-weight: 600; }
.es-sum .es-sum-total dd { font-size: 1.75rem; font-weight: 600; letter-spacing: -0.03em; }
.es-summary .db-ticks { margin: 20px 0 22px; }
@media (min-width: 961px) { .es-order .db-side { position: sticky; top: calc(var(--header-h) + 24px); } }

/* ---------- Facts ---------- */
.es-facts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.es-fact { background: #fff; border-radius: var(--r-md); padding: 28px; }
.es-fact .db-label-sm { margin-bottom: 12px; }
.es-fact-num { font-family: var(--font-display); font-weight: 600; font-size: clamp(2rem, 1.6rem + 1.4vw, 2.75rem); line-height: 1.05; letter-spacing: -0.03em; color: var(--ink); }
.es-fact-num.es-fact-text { font-size: clamp(1.25rem, 1.1rem + .5vw, 1.5rem); line-height: 1.2; letter-spacing: -0.015em; min-height: 2.4em; display: flex; align-items: flex-end; }
.es-fact p:last-child { font-size: .9063rem; color: var(--ink-soft); margin-top: 12px; }
.es-notes { margin-top: 16px; background: #fff; border-radius: var(--r-md); padding: 28px; }
.es-notes h3 { font-size: 1.25rem; letter-spacing: -0.012em; }
.es-notes ul { margin: 12px 0 0; padding-left: 1.2em; display: grid; gap: 8px; font-size: 1rem; color: #2F3A4C; }
.es-notes li::marker { color: var(--accent); }
.es-over { margin-top: 28px; font-size: 1rem; max-width: 62ch; }
.es-over a { color: var(--navy); font-weight: 500; }

/* ---------- Article list ---------- */
.es-list-filter { max-width: 420px; }
.es-list-filter + .es-help { margin: 10px 0 0; min-height: 1.4em; }
.es-list-group { font-size: 1.125rem; letter-spacing: -0.01em; margin: 40px 0 0; display: flex; align-items: baseline; gap: 10px; }
.es-list-group span { font-family: var(--font-body); font-size: .8125rem; font-weight: 500; color: var(--ink-faint); }
.es-list { list-style: none; padding: 0; margin: 16px 0 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 clamp(24px, 4vw, 56px); border-top: 1px solid var(--line-strong); }
.es-list li[hidden] { display: none; }
.es-item { display: grid; grid-template-columns: 5.2em minmax(0, 1fr) auto; gap: 4px 14px; align-items: baseline; padding: 14px 4px; border-bottom: 1px solid var(--line); text-decoration: none; color: var(--ink-soft); transition: background-color .2s var(--ease); }
.es-item:hover { background: var(--surface); }
.es-item-no { font-size: .8125rem; color: var(--ink-faint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.es-item-name { color: var(--ink); font-weight: 500; font-size: .9688rem; line-height: 1.4; }
.es-item:not(:has(.es-item-no)) .es-item-name { grid-column: 1 / 3; }
.es-item-range { font-size: .8125rem; color: var(--ink-faint); white-space: nowrap; }
.es-item:hover .es-item-name { color: var(--navy); }

/* ---------- Two-column text blocks ---------- */
.es-split { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(40px, 6vw, 96px); align-items: start; }
.es-split h2 { font-size: clamp(1.75rem, 1.4rem + 1.1vw, 2.375rem); letter-spacing: -0.02em; }
.es-rules { list-style: none; padding: 0; margin: 20px 0 0; border-top: 1px solid var(--line-strong); }
.es-rules li { padding: 14px 0; border-bottom: 1px solid var(--line); font-size: .9688rem; color: #2F3A4C; }
.es-rules strong { color: var(--ink); }
.es-rules a { color: var(--navy); }
.es-source { font-size: .8125rem; color: var(--ink-faint); margin-top: 32px; max-width: none; }
.es-source a { color: inherit; text-decoration: underline; text-underline-offset: 3px; }

/* ---------- Other States ---------- */
.es-others { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 clamp(24px, 4vw, 56px); border-top: 1px solid var(--line-strong); }
.es-others a { display: flex; justify-content: space-between; gap: 16px; padding: 14px 4px; border-bottom: 1px solid var(--line); text-decoration: none; color: var(--ink); font-weight: 500; font-size: .9688rem; }
.es-others a span:last-child { color: var(--ink-faint); font-weight: 400; font-size: .875rem; white-space: nowrap; }
.es-others a:hover { color: var(--navy); background: rgba(255,255,255,.6); }

/* ---------- Responsive ---------- */
@media (max-width: 1080px) {
	.es-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.es-others { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 960px) {
	.es-card { margin: 0 auto; transform: none; }
	.es-split { grid-template-columns: 1fr; }
	.es-list { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
	/* The State table becomes a stack of cards: nothing scrolls sideways on a phone. */
	.es-table-wrap { overflow: visible; background: transparent; border: 0 !important; border-radius: 0; }
	.es-table { min-width: 0; display: block; }
	.es-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
	.es-table tbody { display: grid; gap: 12px; }
	.es-table tr { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 16px; background: var(--surface); border-radius: var(--r-md); padding: 20px; }
	.es-table th[scope="row"], .es-table td { display: block; padding: 0; border: 0; }
	.es-table th[scope="row"] { grid-column: 1 / -1; padding-bottom: 12px; margin-bottom: 4px; border-bottom: 1px solid var(--line); }
	.es-table td[data-label] { padding: 10px 0 0; font-size: 1.0625rem; color: var(--ink); font-weight: 600; }
	.es-table td[data-label]::before { content: attr(data-label); display: block; font-size: .75rem; font-weight: 500; color: var(--ink-faint); letter-spacing: .02em; }
	.es-table td.es-go { grid-column: 1 / -1; padding-top: 16px; text-align: left; }
	.es-table td.es-go .db-btn { width: 100%; height: 44px; }
	.es-compare { min-width: 620px; }
}
@media (max-width: 640px) {
	.es-facts, .es-others { grid-template-columns: 1fr; }
	.es-item { grid-template-columns: minmax(0, 1fr) auto; }
	.es-item-no { grid-column: 1 / -1; }
	.es-item:not(:has(.es-item-no)) .es-item-name { grid-column: 1; }
	.es-radio legend { float: none; width: 100%; margin: 0 0 4px; }
	.es-form .db-btn-lg { width: 100%; }
	.es-quick-btn { height: 40px; }
}
@media (prefers-reduced-motion: reduce) {
	.es-card { transform: none; }
}

/* Hub picker */
#es-pick-filter-wrap[hidden] { display: none; }
#es-pick-article:disabled { background-color: var(--surface-deep); color: var(--ink-faint); cursor: not-allowed; }
#es-pick-amount[readonly] { background-color: var(--surface-deep); }

/* Common documents */
.es-common { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.es-common-card { background: var(--surface); border-radius: var(--r-md); padding: 26px; }
.es-common-card h3 { font-size: 1.3125rem; letter-spacing: -0.014em; }
.es-common-n { font-size: .8125rem; color: var(--ink-faint); margin-top: 4px; }
.es-common-card ul { list-style: none; padding: 0; margin: 16px 0 0; border-top: 1px solid var(--line-strong); }
.es-common-card li { border-bottom: 1px solid var(--line); }
.es-common-card li a { display: block; padding: 11px 0; font-size: .9375rem; line-height: 1.4; color: var(--ink); font-weight: 500; text-decoration: none; }
.es-common-card li a:hover { color: var(--navy); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.es-common-more { font-size: .8125rem; margin-top: 12px; }
.es-common-more a { color: var(--ink-faint); }
.es-gap { height: clamp(64px, 8vw, 104px); }
@media (max-width: 1080px) { .es-common { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .es-common { grid-template-columns: 1fr; } }
