/* A small writing workspace in Save Homestake's established visual language. */
.wh-builder {
  --wh-ink: var(--ink, #102d27);
  --wh-muted: var(--ink-soft, #4c625b);
  --wh-paper: var(--white, #fffdf8);
  --wh-surface: #edf1e9;
  --wh-line: rgba(16, 45, 39, .17);
  --wh-accent: var(--pine-700, #1d5749);
  --wh-dark: var(--pine-900, #0b2f29);
  --wh-gold: var(--gold, #e5c877);
  --wh-serif: var(--serif, Georgia, 'Times New Roman', serif);
  --wh-sans: var(--sans, Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif);
  --wh-intro-image: url('/assets/media/homestake-creek-mist-library-960.webp');
  width: min(calc(100% - 3rem), 1100px);
  margin: 0 auto;
  padding: clamp(1.75rem, 4vw, 3.25rem) 0 4rem;
  color: var(--wh-ink);
  font-family: var(--wh-sans);
  font-size: 1rem;
  line-height: 1.65;
}
.wh-builder *, .wh-dialog * { box-sizing: border-box; }
.wh-builder h1, .wh-builder h2, .wh-builder h3, .wh-dialog h2, .wh-dialog h3 { color: var(--wh-ink, #102d27); line-height: 1.16; }
.wh-builder h1, .wh-builder h2, .wh-builder h3, .wh-dialog h2 { font-family: var(--wh-serif, Georgia, 'Times New Roman', serif); font-weight: 400; letter-spacing: -.035em; }
.wh-builder h1 { font-size: clamp(2.25rem, 4.7vw, 3.65rem); margin: .45rem 0 1rem; max-width: 18ch; text-wrap: balance; }
.wh-builder h2 { font-size: clamp(1.65rem, 3.25vw, 2.45rem); margin: 0 0 .8rem; text-wrap: balance; }
.wh-builder h3 { font-size: 1.4rem; margin: 0 0 .8rem; }
.wh-builder p { margin: 0 0 1rem; }
.wh-builder a, .wh-dialog a { color: var(--wh-accent, #1d5749); text-underline-offset: .22em; text-decoration-thickness: 1px; }
.wh-builder a:hover, .wh-dialog a:hover { text-decoration-thickness: 2px; }
.wh-builder > header { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); column-gap: clamp(2rem, 4vw, 3.5rem); align-content: center; padding-bottom: .7rem; }
.wh-builder > header > * { grid-column: 1; }
.wh-builder > header::after { content: ''; grid-column: 2; grid-row: 1 / 5; width: 100%; height: clamp(280px, 29vw, 340px); align-self: center; background: #dce9e3 var(--wh-intro-image) center 64% / cover no-repeat; border-radius: 16px; }
.wh-eyebrow { color: var(--wh-accent); font-size: .73rem; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; margin: 0 0 .5rem !important; }
.wh-builder > header > .wh-eyebrow { display: flex; align-items: center; gap: .75rem; }
.wh-builder > header > .wh-eyebrow::before { content: ''; width: 28px; height: 2px; flex: 0 0 28px; background: var(--wh-gold); }
.wh-intro { max-width: 56ch; color: var(--wh-muted); font-size: 1.02rem; line-height: 1.65; }
.wh-status { padding: 1rem 1.2rem; margin: 1.15rem 0; background: var(--wh-surface); border: 1px solid var(--wh-line); border-left: 3px solid var(--wh-accent); border-radius: 10px; font-size: .925rem; }
.wh-status p:last-child { margin-bottom: 0; }
.wh-status strong { display: block; margin-bottom: .1rem; color: var(--wh-ink); font-weight: 750; }
.wh-status--pending { border-color: #d9cba7; border-left-color: #a1843c; background: #f3eddd; }
.wh-status--error { border-color: #cda99a; border-left-color: #a34431; background: #fbf0eb; }
.wh-step-list { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); list-style: none; padding: .35rem; margin: 1.4rem 0 1.2rem; gap: .3rem; border: 1px solid var(--wh-line); border-radius: 18px; background: #f0ecdf; }
.wh-step-list li { min-width: 0; }
.wh-step { display: flex; gap: .65rem; align-items: center; text-align: left; width: 100%; min-height: 58px; background: transparent; border: 1px solid transparent; border-radius: 13px; color: var(--wh-muted); padding: .65rem .9rem; font: inherit; font-size: .88rem; font-weight: 650; line-height: 1.3; cursor: pointer; }
.wh-step:hover { background: #e7e7d9; color: var(--wh-ink); }
.wh-step[aria-current='step'] { background: var(--wh-dark); color: var(--wh-paper); }
.wh-step-number { flex: 0 0 29px; height: 29px; border-radius: 50%; display: grid; place-items: center; border: 1px solid #b4c0b4; font-size: .8rem; font-weight: 750; }
.wh-step[aria-current='step'] .wh-step-number { background: var(--wh-gold); border-color: var(--wh-gold); color: var(--wh-dark); }
.wh-panel { min-width: 0; background: var(--wh-paper); border: 1px solid var(--wh-line); border-radius: 22px; padding: clamp(1.25rem, 3.5vw, 2.4rem); box-shadow: 0 8px 32px rgba(6, 31, 27, .035); scroll-margin-top: calc(var(--header-height, 0px) + 1.5rem); }
.wh-panel-header { margin-bottom: 1.6rem; max-width: 66ch; }
.wh-panel-header p { color: var(--wh-muted); }
.wh-panel-header .wh-eyebrow { color: var(--wh-accent); }
.wh-field { display: grid; gap: .55rem; margin: 1.3rem 0; }
.wh-field label, .wh-label { font-weight: 750; font-size: .94rem; }
.wh-field label .wh-help { font-weight: 400; }
.wh-field small, .wh-help { color: var(--wh-muted); font-size: .875rem; line-height: 1.55; }
.wh-builder textarea, .wh-builder input[type='text'], .wh-builder select { font: inherit; font-size: 1rem; color: var(--wh-ink); background: #fff; border: 1px solid #7f9183; border-radius: 10px; padding: .95rem 1rem; max-width: 100%; width: 100%; min-width: 0; }
.wh-builder select { min-height: 48px; padding: .7rem .9rem; }
.wh-builder textarea { resize: vertical; min-height: 128px; line-height: 1.7; }
.wh-builder textarea::placeholder, .wh-builder input::placeholder { color: #65756a; opacity: 1; }
.wh-actions { display: flex; gap: .65rem; flex-wrap: wrap; align-items: center; }
.wh-button { appearance: none; display: inline-flex; align-items: center; justify-content: center; gap: .5rem; min-height: 46px; padding: .72rem 1.15rem; border: 1px solid var(--wh-dark, #0b2f29); border-radius: 999px; background: var(--wh-dark, #0b2f29); color: var(--white, #fffdf8); font: inherit; font-size: .9rem; font-weight: 750; line-height: 1.35; text-decoration: none; text-align: center; cursor: pointer; }
a.wh-button { color: var(--white, #fffdf8); text-decoration: none; }
.wh-button:hover { background: var(--wh-accent, #1d5749); border-color: var(--wh-accent, #1d5749); color: #fffdf8; }
.wh-button--secondary { color: var(--wh-dark, #0b2f29); background: transparent; border-color: #a5b3a7; }
a.wh-button--secondary { color: var(--wh-dark, #0b2f29); }
.wh-button--secondary:hover { background: #edf1e9; border-color: var(--wh-accent, #1d5749); color: var(--wh-ink, #102d27); }
.wh-button--quiet { padding: .6rem .2rem; color: var(--wh-accent, #1d5749); background: transparent; border-color: transparent; border-radius: 4px; font-weight: 650; text-decoration: underline; text-underline-offset: .22em; }
.wh-button--quiet:hover { background: transparent; border-color: transparent; color: var(--wh-dark, #0b2f29); text-decoration-thickness: 2px; }
.wh-button--danger { color: #8c332b; border-color: #c79b8c; background: transparent; }
.wh-button--danger:hover { background: #faece5; color: #6f2018; border-color: #8c332b; }
.wh-button:disabled { cursor: default; opacity: .65; }
.wh-button:disabled:hover { transform: none; }
.wh-button:focus-visible, .wh-builder a:focus-visible, .wh-builder button:focus-visible, .wh-builder textarea:focus-visible, .wh-builder select:focus-visible, .wh-builder summary:focus-visible, .wh-builder input:focus-visible, .wh-dialog a:focus-visible, .wh-dialog button:focus-visible, .wh-dialog textarea:focus-visible, .wh-dialog summary:focus-visible { outline: 2px solid var(--wh-dark, #0b2f29); outline-offset: 3px; box-shadow: 0 0 0 5px var(--wh-gold, #e5c877); }
.wh-stage-footer { border-top: 1px solid var(--wh-line); margin-top: 1.8rem; padding-top: 1.4rem; display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: .8rem; }
.wh-stage-footer .wh-actions { margin-left: auto; }
.wh-stage-footer .wh-actions .wh-button { padding-inline: 1.5rem; }
.wh-filter-bar { display: flex; align-items: end; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin: 1.3rem 0 1.2rem; }
.wh-filter-bar .wh-field { margin: 0; min-width: min(250px, 100%); }
.wh-filter-bar .wh-field label { font-size: .85rem; }
.wh-count { color: var(--wh-accent); font-size: .875rem; font-weight: 650; margin: 0 0 .6rem !important; }
.wh-evidence-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
.wh-evidence-card { display: flex; flex-direction: column; min-width: 0; border: 1px solid #cad3c6; border-radius: 15px; padding: 1.35rem; background: #fafaf4; }
.wh-evidence-card[data-selected='true'] { background: #eaf1e7; border-color: #79947c; box-shadow: inset 0 3px 0 #1d5749; }
.wh-evidence-topic { align-self: flex-start; padding: .2rem .6rem; border: 1px solid #ccd7c9; border-radius: 999px; color: var(--wh-accent); font-size: .72rem !important; font-weight: 750; letter-spacing: .015em; margin-bottom: 1rem !important; }
.wh-evidence-card h3 { font-size: 1.5rem; line-height: 1.17; letter-spacing: -.025em; margin-bottom: .9rem; }
.wh-evidence-card p { font-size: .94rem; line-height: 1.6; }
.wh-evidence-card h3 + p + p { color: var(--wh-muted); font-size: .9rem; }
.wh-card-actions { margin-top: auto; padding-top: .3rem; }
.wh-card-actions > .wh-button { width: 100%; margin-top: .4rem; }
.wh-card-actions > [data-wh-action='learn'] { min-height: 44px; background: transparent; border-color: transparent; color: var(--wh-accent); text-decoration: underline; text-underline-offset: .22em; padding-block: .55rem; }
.wh-card-actions > [data-wh-action='learn']:hover { background: #edf1e9; }
.wh-card-actions > [data-wh-action='select']:disabled { opacity: 1; background: #dce9d9; border-color: #9db49b; color: #234c37; }
.wh-card-secondary { display: flex; flex-wrap: wrap; gap: .15rem .8rem; margin-top: .5rem; border-top: 1px solid #dce2d6; padding-top: .45rem; }
.wh-card-secondary .wh-button { font-size: .79rem; line-height: 1.35; min-height: 44px; text-align: left; justify-content: flex-start; }
.wh-card-secondary .wh-button[aria-pressed='true'] { text-decoration: none; color: var(--wh-dark); font-weight: 750; }
.wh-card-secondary .wh-button:disabled { color: #657166; opacity: 1; text-decoration: none; }
.wh-discovery-footer { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: .5rem; margin-top: 1rem; }
.wh-empty { background: var(--wh-surface); padding: 1rem 1.2rem; border-radius: 10px; }
.wh-outline-list { list-style: none; padding: 0; margin: 1.3rem 0; display: grid; gap: 1.2rem; }
.wh-outline-card { border: 1px solid var(--wh-line); border-radius: 15px; padding: 1.3rem; background: #f8f9f2; }
.wh-outline-heading { display: flex; flex-wrap: wrap; gap: .6rem; justify-content: space-between; align-items: start; }
.wh-outline-heading h3 { flex: 1 1 220px; margin-bottom: 0; padding-top: .4rem; }
.wh-outline-tools { display: flex; flex-wrap: wrap; gap: .35rem; }
.wh-outline-tools .wh-button { min-width: 44px; padding: .4rem .65rem; font-size: .82rem; }
.wh-outline-card .wh-field { margin-bottom: .6rem; }
.wh-starter { font-size: .9rem; }
.wh-source-note { font-size: .82rem; color: var(--wh-muted); margin-top: .7rem; overflow-wrap: anywhere; }
.wh-review-text { min-height: 390px !important; padding: 1.2rem !important; }
.wh-reference-list { margin: 0; padding-left: 1.3rem; }
.wh-reference-list li { margin: .8rem 0; font-size: .9rem; overflow-wrap: anywhere; }
.wh-reference-list a { display: inline-block; }
.wh-details { margin: 1.2rem 0; border-top: 1px solid var(--wh-line); padding-top: .7rem; }
.wh-details summary { cursor: pointer; min-height: 44px; padding: .55rem 0; font-weight: 650; font-size: .9rem; }
.wh-details-content { padding-top: .6rem; }
.wh-details-content .wh-help { max-width: 70ch; }
.wh-save-tools { margin-top: 1.2rem; padding-inline: .25rem; color: var(--wh-muted); font-size: .85rem; }
.wh-save-line { display: flex; flex-wrap: wrap; gap: .3rem 1rem; align-items: center; margin-bottom: .6rem; }
.wh-save-tools .wh-details { margin-top: .3rem; }
.wh-save-tools .wh-button { font-size: .85rem; }
.wh-file-label { position: relative; overflow: hidden; }
.wh-file-label input { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; height: 100%; }
.wh-file-label:focus-within { outline: 2px solid var(--wh-dark, #0b2f29); outline-offset: 3px; box-shadow: 0 0 0 5px var(--wh-gold, #e5c877); }
.wh-submission-details { display: grid; grid-template-columns: minmax(90px, .25fr) 1fr; gap: .6rem 1rem; margin: 1rem 0 1.5rem; font-size: .925rem; }
.wh-submission-details dt { font-weight: 700; }
.wh-submission-details dd { margin: 0; overflow-wrap: anywhere; }
.wh-send-steps { padding-left: 1.4rem; margin: 1rem 0; }
.wh-send-steps li { margin: .6rem 0; }
.wh-sent-check { display: flex; align-items: start; gap: .65rem; margin: 1rem 0; cursor: pointer; min-height: 44px; }
.wh-sent-check input { width: 20px; height: 20px; margin-top: .25rem; accent-color: var(--wh-accent); }
.wh-readiness { margin-top: .85rem !important; font-size: .875rem; color: var(--wh-muted); }
.wh-email-handoff { margin: 1.5rem 0 1rem; padding: clamp(1.2rem, 3vw, 1.7rem); border: 1px solid var(--wh-dark); border-radius: 17px; background: var(--wh-dark); color: #fffdf8; }
.wh-email-handoff h2, .wh-email-handoff h3 { color: #fffdf8; }
.wh-email-handoff .wh-help, .wh-email-handoff .wh-email-note { color: #d6e3d9; }
.wh-email-handoff a { color: var(--wh-gold); }
.wh-email-intro { max-width: 62ch; margin-bottom: 1rem; }
.wh-email-action, .wh-email-handoff .wh-email-action { background: var(--wh-gold); border-color: var(--wh-gold); color: #061f1b; padding-inline: 1.5rem; min-height: 50px; font-size: .95rem; }
.wh-email-action:hover, .wh-email-handoff .wh-email-action:hover { background: #f1d897; border-color: #f1d897; color: #061f1b; }
.wh-email-note { margin: .9rem 0 0; font-size: .875rem; line-height: 1.6; }
.wh-email-handoff .wh-details { border-color: rgba(255,253,248,.23); }
.wh-email-handoff .wh-button:focus-visible, .wh-email-handoff summary:focus-visible { outline-color: #fffdf8; box-shadow: 0 0 0 5px #1d5749; }
.wh-visually-hidden { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.wh-dialog { --wh-ink: #102d27; --wh-accent: #1d5749; --wh-dark: #0b2f29; --wh-gold: #e5c877; --wh-line: rgba(16,45,39,.17); position: fixed; inset: 0; margin: auto; width: min(calc(100% - 2.4rem), 620px); height: fit-content; max-height: calc(100dvh - 2.4rem); overflow-y: auto; overscroll-behavior: contain; background: #fffdf8; border: 1px solid #bccabb; border-radius: 20px; padding: clamp(1.4rem, 3vw, 2rem); box-shadow: 0 24px 80px rgba(4,26,22,.28); line-height: 1.65; color: #102d27; font-family: var(--sans, Inter, ui-sans-serif, system-ui, sans-serif); }
.wh-dialog::backdrop { background: rgba(6, 31, 27, .72); }
.wh-dialog h2 { font-size: 1.95rem; padding-right: 1.8rem; margin: .3rem 0 1.3rem; }
.wh-dialog h3 { font-size: .92rem; margin: 1.35rem 0 .45rem; font-weight: 750; }
.wh-dialog p { margin: .5rem 0 1rem; }
.wh-dialog-close { position: absolute; right: .7rem; top: .7rem; background: #edf1e9; color: #1d5749; border: 1px solid #d8dfd2; border-radius: 50%; width: 44px; height: 44px; font-size: 1.5rem; line-height: 1; cursor: pointer; }
.wh-dialog-close:hover { background: #dce9e3; }
.wh-dialog .wh-help { color: #4c625b; }
.wh-dialog .wh-actions { margin-top: 1.3rem; }
.wh-dialog textarea { max-width: 100%; border: 1px solid #7f9183; border-radius: 10px; color: #102d27; background: #fff; line-height: 1.6; }
.wh-correction { margin-top: .8rem; border-left: 3px solid #a0783f; padding: .9rem 1rem; border-radius: 8px; background: #f7f1e6; font-size: .9rem; }
.wh-connection-context { margin-top: 1.4rem; padding: 1.15rem 1.25rem .35rem; border: 1px solid #d6dfd0; border-radius: 12px; background: #eef2e9; color: var(--wh-muted); max-width: 72ch; font-size: .925rem; }
.wh-connection-context .wh-button { font-size: .875rem; }
.wh-letter-tools { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: .5rem; }
@media (max-width: 900px) {
  .wh-builder > header { grid-template-columns: minmax(0, 1fr); }
  .wh-builder > header::after { grid-column: 1; grid-row: 5; height: clamp(190px, 40vw, 300px); margin-top: 1.25rem; }
  .wh-step { padding-inline: .65rem; gap: .45rem; font-size: .82rem; }
  .wh-evidence-grid { grid-template-columns: 1fr; gap: 1rem; }
  .wh-evidence-card { padding: 1.25rem; }
  .wh-evidence-card h3 { max-width: 32ch; }
  .wh-evidence-card p { max-width: 68ch; }
  .wh-card-actions > .wh-button { width: auto; margin-right: .4rem; padding-inline: 1.1rem; }
  .wh-card-secondary { gap: .3rem 1rem; }
}
@media (max-width: 700px) {
  .wh-builder { width: min(calc(100% - 2rem), 1100px); padding-top: 1.6rem; }
  .wh-builder > header { grid-template-columns: 1fr; }
  .wh-builder h1 { max-width: 20ch; font-size: clamp(2.2rem, 7vw, 3rem); }
  .wh-intro { font-size: 1rem; }
  .wh-step-list { grid-template-columns: repeat(2, minmax(0, 1fr)); margin: 1.1rem 0; padding: .3rem; border-radius: 15px; }
  .wh-step { min-height: 52px; padding: .65rem .8rem; font-size: .85rem; }
  .wh-step-number { flex-basis: 27px; height: 27px; }
  .wh-panel { border-radius: 17px; padding: 1.2rem; }
  .wh-panel-header { margin-bottom: 1.3rem; }
  .wh-stage-footer { align-items: stretch; }
  .wh-submission-details { grid-template-columns: 1fr; gap: .2rem; }
  .wh-submission-details dd { margin-bottom: .6rem; }
  .wh-connection-context { padding-inline: 1rem; }
}
@media (max-width: 440px) {
  .wh-builder { width: calc(100% - 1.4rem); }
  .wh-builder h1 { font-size: 2.15rem; }
  .wh-step { font-size: .79rem; padding-inline: .6rem; gap: .45rem; }
  .wh-panel { padding: 1.05rem; }
  .wh-status { padding: .85rem 1rem; }
  .wh-dialog { inset: auto 0 0; width: 100%; margin: 0 auto; max-height: 92dvh; border-radius: 20px 20px 0 0; padding: 1.35rem; padding-bottom: max(1.35rem, env(safe-area-inset-bottom)); }
  .wh-dialog h2 { font-size: 1.7rem; }
  .wh-stage-footer .wh-actions { width: 100%; }
  .wh-stage-footer .wh-actions .wh-button, .wh-email-action { width: 100%; }
  .wh-filter-bar .wh-field { width: 100%; }
  .wh-card-actions > .wh-button { width: 100%; margin-right: 0; }
  .wh-outline-card { padding: 1rem; }
}
@media (prefers-reduced-motion: reduce) { .wh-builder *, .wh-dialog * { animation: none !important; transition: none !important; scroll-behavior: auto !important; } }
@media print {
  .wh-step-list, .wh-save-tools, .wh-button, .wh-stage-footer, .wh-status, .wh-send-steps, .wh-builder > header::after { display: none !important; }
  .wh-builder { width: 100%; padding: 0; color: #000; }
  .wh-panel { border: 0; box-shadow: none; }
  .wh-email-handoff { background: white; color: black; border-color: #bbb; }
}

/* The writer leads Take Action; existing ways to help remain below it. */
.wh-action-top { background: var(--paper, #f8f5ed); scroll-margin-top: calc(var(--header-height, 80px) + 1rem); }
.action-intro .wh-other-actions-title { margin: 0; max-width: 950px; color: var(--white, #fffdf8); font-family: var(--serif, Georgia, serif); font-size: clamp(2.15rem, 4.3vw, 3.65rem); font-weight: 500; letter-spacing: -.035em; line-height: 1.08; }
