/* Public forms for royalty owners and vendors, branded HighMark Energy Operating
   (decided 2026-11-12; the TicketPoint front was dropped). Deliberate deviation from
   design.md on two counts: (1) the pages are read by mineral owners, many of them
   older, so body type is 16px with generous spacing and light mode is the default;
   (2) the accent follows the HighMark wordmark (steel blue, slate green) rather than
   the house teal. The colors are read off the logo on the paper forms; replace them
   and the text wordmark when the brand file arrives. Layout tokens, type scale and
   fonts are still the house ones. */

html[data-theme="light"] {
  --tp-navy: #2c4a5c;
  --tp-blue: #35749a;
  --hm-slate: #5f7a6d;
  --brand: #35749a;
  --brand-hover: #2a5f80;
  --brand-text-on-tint: #2c4a5c;
  --brand-tint-08: rgba(53,116,154,0.08);
  --brand-tint-15: rgba(53,116,154,0.14);
  --shadow-focus-glow: 0 0 0 3px rgba(53,116,154,0.18);
  --bg-base: #f4f6f7;
}
html { background: var(--bg-base); accent-color: var(--tp-blue); }
body { font-size: 16px; line-height: 1.55; color: var(--text-primary); }

.wrap { max-width: 760px; margin: 0 auto; padding: 0 16px; }

.site-header { background: var(--surface-raised); border-bottom: 1px solid var(--border-default); }
.site-header-inner { display: flex; align-items: center; gap: 14px; padding: 14px 16px; flex-wrap: wrap; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; }
.brand:hover { text-decoration: none; }
.brand-logo { display: block; height: 40px; width: auto; max-width: 100%; }
.back-top { margin: 0 0 14px; }
.back-top a { text-decoration: none; font-weight: 600; }
.back-top a:hover { text-decoration: underline; }
.site-section { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em; color: var(--brand-text-on-tint); background: var(--brand-tint-15); padding: 4px 9px; border-radius: 999px; margin-left: auto; }

main { padding: 28px 0 40px; }

.intro h1 { font-size: 26px; font-weight: 600; margin-bottom: 10px; }
.intro p { margin-bottom: 10px; color: var(--text-secondary); }
.intro .note { font-size: 15px; padding: 12px 14px; border-left: 3px solid var(--brand); background: var(--brand-tint-08); color: var(--text-primary); border-radius: 0 6px 6px 0; }

.alert { padding: 12px 14px; border-radius: 6px; margin: 18px 0 6px; font-size: 15px; }
.alert-error { background: var(--toast-error-bg); color: var(--toast-error-fg); border-left: 3px solid var(--danger); }

.request-form { margin-top: 20px; background: var(--surface-raised); border: 1px solid var(--border-default); border-radius: 10px; padding: 22px 22px 18px; box-shadow: var(--shadow-floating); }
.field { margin-bottom: 18px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.field label { display: block; font-size: 14px; font-weight: 600; margin-bottom: 6px; color: var(--text-primary); }
.field .req { font-weight: 400; font-size: 12px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-tertiary); margin-left: 6px; }
.field .opt { font-weight: 400; font-size: 12px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-muted); margin-left: 6px; }
.field input[type="text"], .field input[type="email"], .field input[type="tel"], .field select, .field textarea {
  width: 100%; font: inherit; font-size: 16px; padding: 11px 12px; color: var(--text-primary);
  background: var(--surface-raised); border: 1px solid var(--border-emphasis); border-radius: 6px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.field textarea { resize: vertical; min-height: 150px; line-height: 1.5; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--brand); box-shadow: var(--shadow-focus-glow); }
.field input[type="file"] { display: block; font-size: 14px; padding: 8px 0; }
.field .hint { font-size: 13px; color: var(--text-tertiary); margin-top: 6px; }
.field .error { font-size: 14px; color: var(--toast-error-fg); margin-top: 6px; font-weight: 500; }
.field.has-error input, .field.has-error select, .field.has-error textarea { border-color: var(--danger); }

.hp { position: absolute; left: -10000px; top: auto; width: 1px; height: 1px; overflow: hidden; }
.checkline { display: flex; align-items: center; gap: 8px; margin-top: 8px; font-size: 14px; cursor: pointer; }
.checkline input { width: auto; margin: 0; }

.actions { margin-top: 8px; display: flex; align-items: center; gap: 14px; }
.btn-submit { font: inherit; font-size: 15px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.4px; padding: 13px 26px; border: none; border-radius: 6px; background: var(--tp-blue); color: #ffffff; cursor: pointer; transition: background 0.2s ease; }
.btn-submit:hover { background: var(--brand-hover); }
.btn-submit:disabled { opacity: 0.5; cursor: wait; }

.result { background: var(--surface-raised); border: 1px solid var(--border-default); border-left: 4px solid var(--brand); border-radius: 10px; padding: 26px 24px; box-shadow: var(--shadow-floating); }
.result-hold { border-left-color: var(--warning); }
.result h1 { font-size: 24px; font-weight: 600; margin-bottom: 8px; }
.result .ref { font-size: 18px; margin-bottom: 14px; }
.result .ref strong { font-family: 'Consolas', monospace; font-size: 20px; letter-spacing: 0.5px; color: var(--brand-text-on-tint); background: var(--brand-tint-15); padding: 2px 8px; border-radius: 4px; }
.result .message { font-size: 17px; margin-bottom: 12px; }
.result .hint { font-size: 14px; color: var(--text-tertiary); }
.back { margin-top: 18px; font-size: 15px; }
.back a { color: var(--brand-text-on-tint); }

.site-footer { border-top: 1px solid var(--border-default); padding: 18px 0 30px; color: var(--text-tertiary); font-size: 13px; }
.site-footer p { margin-bottom: 6px; }
.site-footer .tagline { font-size: 15px; color: var(--text-secondary); }
.site-footer .domain { margin-top: 10px; color: var(--text-muted); }

/* Fillable forms (change of address, ACH) */
.open-request { margin: 0 0 18px; padding: 12px 14px; border-radius: 0 6px 6px 0; border-left: 3px solid var(--brand); background: var(--toast-info-bg); color: var(--toast-info-fg); font-size: 15px; line-height: 1.5; }
.open-request strong { color: inherit; }

.form-links { margin-top: 14px; display: grid; gap: 10px; }
.form-links a { display: block; padding: 12px 14px; border: 1px solid var(--border-emphasis); border-left: 3px solid var(--brand); border-radius: 0 6px 6px 0; background: var(--surface-raised); text-decoration: none; color: var(--text-primary); transition: border-color 0.2s ease, box-shadow 0.2s ease; }
.form-links a:hover { border-color: var(--brand); box-shadow: var(--shadow-focus-glow); }
.form-links strong { display: block; color: var(--tp-navy); margin-bottom: 2px; }
.form-links span { font-size: 14px; color: var(--text-tertiary); }

.fieldset-title { font-size: 13px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; color: var(--brand-text-on-tint); margin: 22px 0 12px; padding-bottom: 6px; border-bottom: 1px solid var(--border-default); }
.choice-list { display: grid; gap: 8px; margin-top: 4px; }
.choice-list label { display: flex; align-items: center; gap: 10px; font-weight: 400; font-size: 16px; margin: 0; cursor: pointer; }
.choice-list input { width: auto; }

.esign { margin-top: 24px; padding: 16px; border: 1px solid var(--border-emphasis); border-radius: 8px; background: var(--brand-tint-08); }
.esign .fieldset-title { margin-top: 0; border-bottom: none; padding-bottom: 0; }
.esign .statement { font-size: 15px; color: var(--text-primary); margin-bottom: 12px; }

@media (max-width: 640px) {
  .field-row { grid-template-columns: 1fr; gap: 0; }
  .request-form { padding: 16px 14px; }
  .intro h1 { font-size: 22px; }
}

/* Forms page */
.hub-group { margin-top: 26px; }
.hub-title { font-size: 18px; font-weight: 600; color: var(--tp-navy); margin-bottom: 4px; }
.hub-sub { font-size: 14px; color: var(--text-tertiary); margin-bottom: 4px; }
.intro a { color: var(--brand-text-on-tint); }

/* Field widths as classes: the content security policy blocks inline styles. */
.field input.input-state { max-width: 110px; text-transform: uppercase; }
.field input.input-zip { max-width: 160px; }
.field input.input-tin { max-width: 220px; letter-spacing: 0.06em; }

.esign .certification { font-size: 14px; color: var(--text-primary); background: var(--surface-raised); border: 1px solid var(--border-default); border-radius: 6px; padding: 12px 14px; margin-bottom: 12px; }
.esign .certification p { margin-bottom: 8px; }
.esign .certification p:last-child { margin-bottom: 0; color: var(--text-tertiary); font-size: 13px; }

/* W-9 forms: guided questions or the IRS form layout. The two layouts are fieldsets so
   the one not in use can be disabled as a whole; they carry no frame of their own. */
.wrap.wrap-wide { max-width: 920px; }  /* the IRS layout is drawn near the width of the paper form */
.layout-block { border: 0; padding: 0; margin: 0; min-width: 0; }
.layout-block[hidden] { display: none; }
.layout-toggle { display: flex; gap: 2px; background: var(--inset-medium); border-radius: 6px; padding: 3px; margin: 22px 0 4px; }
.layout-option { flex: 1; padding: 10px 12px; border-radius: 4px; text-align: center; text-decoration: none; font-size: 13px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; color: var(--text-tertiary); transition: all 0.2s ease; }
.layout-option:hover { color: var(--text-secondary); background: var(--surface-tint-05); text-decoration: none; }
.layout-option.active { background: var(--surface-raised); color: var(--brand-text-on-tint); box-shadow: 0 1px 2px rgba(0,0,0,0.12); }
.layout-option:focus-visible { outline: none; box-shadow: var(--shadow-focus-glow); }
.sheet-errors { margin: 0 0 12px 18px; font-size: 14px; font-weight: 500; color: var(--toast-error-fg); }
.sheet-errors li { margin-bottom: 4px; }
.sheet-tools { margin: 12px 0 18px; }
.btn-plain { font: inherit; font-size: 14px; font-weight: 600; padding: 9px 14px; border: 1px solid var(--border-emphasis); border-radius: 6px; background: var(--surface-raised); color: var(--brand-text-on-tint); cursor: pointer; transition: border-color 0.2s ease, box-shadow 0.2s ease; }
.btn-plain:hover { border-color: var(--brand); box-shadow: var(--shadow-focus-glow); }

.sandbox-banner { background: #8a5a00; color: #ffffff; text-align: center; font-size: 14px; font-weight: 600; padding: 8px 14px; }
