/* Horse Alley Portal. One design, nine color schemes (data-theme on <html>); white and red is the default.
   The type follows the Horse Alley wordmark: wide capitals (Montserrat SemiBold) for headings and labels,
   Hanken Grotesk for everything read. Hairline rules instead of shadows, flat color, the accent kept for
   the one action and the page you are on. --glow is the accent as "r, g, b" for tints. */

@font-face { font-family: "HA Text"; font-weight: 100 900; font-style: normal; font-display: swap; src: url(fonts/hanken-grotesk.ttf) format("truetype"); }
@font-face { font-family: "HA Caps"; font-weight: 600; font-style: normal; font-display: swap; src: url(fonts/montserrat-semibold.ttf) format("truetype"); }

:root, [data-theme="white"] { --bg:#ffffff; --panel:#ffffff; --panel2:#f6f5f3; --ink:#141414; --muted:#5d5a56; --faint:#8e8a85; --rule:#e5e2de; --line:#141414; --field:#ffffff; --fline:#d6d2cd; --accent:#c8161d; --accent2:#93101a; --accent-ink:#fff; --glow:200,22,29; --ok:#1f7a3d; --warn:#9a5b00; --err:#b3161d; --shade:255,255,255; }
[data-theme="midnight"]  { --bg:#0c0c0d; --panel:#131315; --panel2:#1b1b1e; --ink:#f4f2ee; --muted:#a8a49c; --faint:#77736c; --rule:#2a2a2e; --line:#f4f2ee; --field:#0f0f10; --fline:#3a3a3f; --accent:#e0402a; --accent2:#9b1d12; --accent-ink:#fff; --glow:224,64,42; --ok:#6fbf73; --warn:#e3a33b; --err:#ff8a73; --shade:12,12,13; }
[data-theme="saddle"]    { --bg:#15100c; --panel:#1b1510; --panel2:#241c16; --ink:#f3ebe0; --muted:#b9aa94; --faint:#857867; --rule:#3a2f25; --line:#f3ebe0; --field:#18120e; --fline:#4a3d31; --accent:#c99a52; --accent2:#8a6326; --accent-ink:#1a120b; --glow:201,154,82; --ok:#8fbf6f; --warn:#e3a33b; --err:#ff8a73; --shade:21,16,12; }
[data-theme="turquoise"] { --bg:#0b1213; --panel:#101a1b; --panel2:#162324; --ink:#eef6f5; --muted:#9bb1af; --faint:#6a8182; --rule:#223334; --line:#eef6f5; --field:#0d1516; --fline:#2f4446; --accent:#2fb5a7; --accent2:#18756c; --accent-ink:#061312; --glow:47,181,167; --ok:#7fd08a; --warn:#e8b04a; --err:#ff8a73; --shade:11,18,19; }
[data-theme="slate"]     { --bg:#101317; --panel:#15191e; --panel2:#1c2128; --ink:#eef1f5; --muted:#a4adb9; --faint:#727b88; --rule:#2a313a; --line:#eef1f5; --field:#12161a; --fline:#38414c; --accent:#5aa6e6; --accent2:#2b6aa3; --accent-ink:#07121d; --glow:90,166,230; --ok:#74c98a; --warn:#e6ad4a; --err:#ff8a73; --shade:16,19,23; }
[data-theme="sage"]      { --bg:#f6f4ee; --panel:#fbfaf6; --panel2:#efece3; --ink:#1f241d; --muted:#5a6256; --faint:#7d837a; --rule:#e0dccf; --line:#1f241d; --field:#fff; --fline:#d2cdbd; --accent:#4c6a40; --accent2:#2f4528; --accent-ink:#fff; --glow:76,106,64; --ok:#2f7a3a; --warn:#8a5a00; --err:#b3261e; --shade:246,244,238; }
[data-theme="navy"]      { --bg:#f5f7fa; --panel:#fbfcfd; --panel2:#edf1f6; --ink:#14213a; --muted:#52607a; --faint:#7f889b; --rule:#dfe4ec; --line:#14213a; --field:#fff; --fline:#cdd4df; --accent:#1f3d6b; --accent2:#10223f; --accent-ink:#fff; --glow:31,61,107; --ok:#2a7a46; --warn:#8a5a00; --err:#b3261e; --shade:245,247,250; }
[data-theme="rodeo"]     { --bg:#f8f4f0; --panel:#fcfaf8; --panel2:#f1eae4; --ink:#231713; --muted:#665650; --faint:#8f7f77; --rule:#e8ded5; --line:#231713; --field:#fff; --fline:#d8ccc2; --accent:#b0281f; --accent2:#741711; --accent-ink:#fff; --glow:176,40,31; --ok:#2f7a3a; --warn:#8a5a00; --err:#b3261e; --shade:248,244,240; }
[data-theme="roan"]      { --bg:#f1f2f4; --panel:#f9fafb; --panel2:#e8eaed; --ink:#1d2227; --muted:#58606a; --faint:#828a93; --rule:#dadee3; --line:#1d2227; --field:#fff; --fline:#c9ced5; --accent:#7a5c8f; --accent2:#4b3559; --accent-ink:#fff; --glow:122,92,143; --ok:#2f7a3a; --warn:#8a5a00; --err:#b3261e; --shade:241,242,244; }

:root, [data-theme="white"], [data-theme="sage"], [data-theme="navy"], [data-theme="rodeo"], [data-theme="roan"] { --card-shadow: 0 1px 2px rgba(20,15,10,.05), 0 12px 30px -18px rgba(20,15,10,.22); --card-shadow-up: 0 2px 4px rgba(20,15,10,.05), 0 22px 44px -22px rgba(20,15,10,.32); --stat-a: #2c2c2e; --stat-b: #161617; --stat-glow: rgba(20,20,22,.55); }
[data-theme="midnight"], [data-theme="saddle"], [data-theme="turquoise"], [data-theme="slate"] { --card-shadow: 0 1px 0 rgba(255,255,255,.03), 0 14px 30px -18px rgba(0,0,0,.8); --card-shadow-up: 0 1px 0 rgba(255,255,255,.04), 0 22px 44px -20px rgba(0,0,0,.9); --stat-a: #2e2e31; --stat-b: #1b1b1d; --stat-glow: rgba(0,0,0,.7); }
:root { --caps: "HA Caps", "Montserrat", "Helvetica Neue", Arial, sans-serif; --text: "HA Text", "Helvetica Neue", Helvetica, Arial, sans-serif; }

* { box-sizing: border-box; }
html, body { margin: 0; }
body { color: var(--ink); background: var(--bg); font: 16px/1.6 var(--text); font-feature-settings: "tnum" 0; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
a { color: inherit; }
img { display: block; max-width: 100%; }
h1, h2, h3, .hap-hd { font-family: var(--caps); font-weight: 600; text-transform: uppercase; letter-spacing: .03em; line-height: 1.1; margin: 0; }
.hap-x { font-family: var(--text); font-weight: 400; text-transform: none; color: var(--faint); letter-spacing: 0; }
/* The small capitals over a title: where you are, never shouted in the accent */
.hap-eyebrow { font-family: var(--caps); font-size: 11px; font-weight: 600; letter-spacing: .18em; text-transform: uppercase; color: var(--faint); margin: 0 0 14px; display: block; }
.hap-eyebrow a { color: var(--muted); text-decoration: none; }
.hap-eyebrow a:hover { color: var(--ink); }
.hap-muted { color: var(--muted); }
.hap-sm { font-size: 14px; }
.hap-wrap { max-width: 1200px; margin: 0 auto; padding: 0 32px; }
.hap-narrow { max-width: 820px; }
.hap-warn-text { color: var(--warn); }
.hap-notes { margin: 18px 0 0; padding-top: 16px; border-top: 1px solid var(--rule); color: var(--muted); font-size: 15px; }

/* Header: the ranch and who is signed in, then the pages on their own row */
.hap-top { position: sticky; top: 0; z-index: 60; background: var(--bg); border-bottom: 1px solid var(--rule); }
.hap-top-in { display: flex; align-items: center; gap: 18px; min-height: 64px; }
.hap-brand { display: flex; align-items: center; gap: 12px; text-decoration: none; min-width: 0; flex: none; }
.hap-mark { flex: none; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font: 600 11px/1 var(--caps); letter-spacing: .06em; color: var(--accent-ink); overflow: hidden; background: var(--accent); }
.hap-mark img { width: 100%; height: 100%; object-fit: cover; background: var(--panel); }
.hap-mark--lg { width: 72px; height: 72px; font-size: 20px; }
.hap-mark--sm { width: 28px; height: 28px; font-size: 10px; }
.hap-brand-t { font-family: var(--caps); font-size: 14px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; line-height: 1.15; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 340px; }
.hap-top-tag { padding-left: 18px; border-left: 1px solid var(--rule); font-family: var(--caps); font-size: 10px; font-weight: 600; letter-spacing: .24em; text-transform: uppercase; color: var(--faint); white-space: nowrap; }
.hap-who { margin-left: auto; display: flex; align-items: center; gap: 22px; font-size: 14px; white-space: nowrap; }
.hap-who a { color: var(--muted); text-decoration: none; }
.hap-who a:hover, .hap-who a.is-on { color: var(--ink); }
.hap-who a.hap-signout { font: 600 10px/1 var(--caps); letter-spacing: .16em; text-transform: uppercase; color: var(--ink); border: 1px solid var(--fline); border-radius: 4px; padding: 9px 12px 8px; }
.hap-who a.hap-signout:hover { border-color: var(--line); }
.hap-who a.hap-avatar { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; border: 1px solid var(--fline); color: var(--ink); font: 600 10px/1 var(--caps); letter-spacing: .06em; }
.hap-navrow { border-top: 1px solid var(--rule); }
.hap-nav { display: flex; gap: 34px; align-items: center; min-height: 50px; }
.hap-nav a { position: relative; text-decoration: none; font-family: var(--caps); font-size: 11px; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); padding: 17px 0 16px; }
.hap-nav a:hover { color: var(--ink); }
.hap-nav a.is-on { color: var(--ink); }
.hap-nav a.is-on::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; background: var(--accent); }
.hap-nav a.hap-btn { margin-left: auto; color: var(--accent-ink); padding: 11px 18px; }
.hap-nav a.hap-btn:hover { color: var(--accent-ink); }
.hap-menu-b { display: none; }

/* Buttons and tags */
.hap-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; background: var(--accent); color: var(--accent-ink); border: 1px solid var(--accent); font: 600 12px/1 var(--caps); letter-spacing: .14em; text-transform: uppercase; text-decoration: none; padding: 15px 24px; cursor: pointer; transition: background-color .15s, border-color .15s, color .15s; }
.hap-btn:hover { background: var(--accent2); border-color: var(--accent2); }
.hap-btn:disabled { opacity: .55; cursor: default; }
.hap-btn--ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.hap-btn--ghost:hover { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.hap-btn--sm { padding: 11px 16px; font-size: 11px; }
.hap-block { display: flex; width: 100%; }
.hap-linkbtn { background: none; border: 0; padding: 0; color: var(--muted); font: inherit; font-size: 14px; text-decoration: underline; text-decoration-color: var(--fline); text-underline-offset: 4px; cursor: pointer; }
.hap-linkbtn:hover { color: var(--ink); text-decoration-color: currentColor; }
.hap-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-top: 24px; }
.hap-chip { display: inline-flex; align-items: center; max-width: 100%; font: 600 10px/1.35 var(--caps); letter-spacing: .14em; text-transform: uppercase; padding: 5px 9px 4px; color: var(--muted); border: 1px solid var(--fline); }
.hap-chip--ok { color: var(--ok); border-color: color-mix(in srgb, var(--ok) 40%, transparent); }
.hap-chip--warn { color: var(--warn); border-color: color-mix(in srgb, var(--warn) 45%, transparent); }
.hap-chip--ac { color: var(--accent); border-color: rgba(var(--glow), .45); }
.hap-chips { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 18px; }

/* Notices: a plain line with a colored edge */
.hap-notice { margin: 0 0 22px; padding: 13px 16px; border: 1px solid var(--rule); border-left: 3px solid var(--line); background: var(--panel); font-size: 15px; }
.hap-notice--ok { border-left-color: var(--ok); }
.hap-notice--err { border-left-color: var(--err); }
.hap-notice ul { margin: 6px 0 0; padding-left: 18px; }
.hap-notice[hidden] { display: none; }

/* Hero: the owner's own photo, fading into the page; text over it on every screen size */
.hap-hero { position: relative; min-height: 480px; display: flex; align-items: flex-end; overflow: hidden; }
.hap-hero > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: var(--focus, 50% 45%); }
.hap-hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(var(--shade), .94) 0%, rgba(var(--shade), .66) 36%, rgba(var(--shade), 0) 68%), linear-gradient(0deg, rgba(var(--shade), 1) 0%, rgba(var(--shade), 0) 42%); }
.hap-hero--plain { min-height: 320px; }
.hap-hero--plain::after { display: none; }
.hap-hero-in { position: relative; z-index: 2; width: 100%; padding-top: 120px; padding-bottom: 50px; }
.hap-hero h1 { font-size: clamp(38px, 5vw, 62px); letter-spacing: -.01em; line-height: 1.02; }
.hap-ranch { font-family: var(--caps); font-size: 11px; font-weight: 600; letter-spacing: .22em; text-transform: uppercase; color: var(--muted); margin: 16px 0 0; }
.hap-hero-tip { margin: 18px 0 0; font-size: 14px; color: var(--muted); }

/* Figures: dark gray cards with a soft light in the corner, overlapping the foot of the photo */
.hap-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; position: relative; z-index: 3; }
.hap-stat { position: relative; overflow: hidden; border-radius: 8px; padding: 20px 22px 22px; text-decoration: none; color: #fff; background: linear-gradient(140deg, var(--stat-a) 0%, var(--stat-b) 100%); box-shadow: 0 18px 40px -22px var(--stat-glow); transition: transform .2s, box-shadow .2s; }
.hap-stat::before { content: ""; position: absolute; right: -50px; top: -70px; width: 190px; height: 190px; border-radius: 50%; background: radial-gradient(circle, rgba(255,255,255,.12), transparent 70%); pointer-events: none; }
a.hap-stat:hover { transform: translateY(-2px); box-shadow: 0 24px 46px -22px var(--stat-glow); }
.hap-stat span { display: block; font-family: var(--caps); font-size: 10px; font-weight: 600; letter-spacing: .18em; text-transform: uppercase; color: rgba(255,255,255,.62); }
.hap-stat b { display: block; font-family: var(--caps); font-size: 34px; font-weight: 600; letter-spacing: -.01em; line-height: 1.05; margin: 14px 0 8px; font-feature-settings: "tnum" 1; }
.hap-stat small { font-size: 14px; color: rgba(255,255,255,.7); }

/* Sections: a rule, the title in capitals, a quiet link at the right */
.hap-sec { padding-top: 64px; }
.hap-sec-h { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 22px; padding-top: 16px; border-top: 1px solid var(--line); }
.hap-sec-h h2 { font-size: 15px; letter-spacing: .16em; }
.hap-sec-h a { font-family: var(--caps); font-size: 10px; font-weight: 600; letter-spacing: .18em; text-transform: uppercase; color: var(--muted); text-decoration: none; }
.hap-sec-h a:hover { color: var(--accent); }
.hap-grid2 { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); gap: 48px; align-items: start; }
.hap-card { background: var(--panel); border: 1px solid var(--rule); padding: 26px 28px; }
.hap-card + .hap-card, form + .hap-card, .hap-card + form, .hap-wrap > form + form { margin-top: 20px; }
.hap-card h2 { font-size: 15px; letter-spacing: .16em; margin-bottom: 18px; }
/* Beside the main column, panels are ruled sections like everything else, not boxes */
.hap-grid2 > div > .hap-card { background: none; border: 0; border-top: 1px solid var(--line); border-radius: 0; padding: 16px 0 0; }
.hap-grid2 > div > .hap-card + .hap-card, .hap-grid2 > div > form + .hap-card, .hap-grid2 > div > .hap-card + form { margin-top: 48px; }
.hap-grid2 > div > .hap-sec-h + .hap-card { border-top: 0; padding-top: 0; }
.hap-grid2 > div > .hap-card > h3:first-child, .hap-grid2 > div > .hap-card > h2:first-child { font-size: 15px; letter-spacing: .16em; margin-bottom: 22px; }
.hap-card h3 { font-size: 11px; letter-spacing: .18em; margin-bottom: 18px; }
.hap-phead { padding: 56px 0 30px; }
.hap-phead h1 { font-size: clamp(30px, 3.6vw, 44px); letter-spacing: .03em; }
.hap-lead { color: var(--muted); max-width: 660px; margin: 14px 0 0; font-size: 17px; }
.hap-phead + .hap-notice, .hap-phead .hap-actions { margin-top: 20px; }
.hap-season-h { display: flex; align-items: baseline; gap: 14px; margin: 44px 0 0; padding: 14px 0 16px; border-top: 1px solid var(--line); }
.hap-phead + .hap-season-h, .hap-filters + .hap-season-h { margin-top: 4px; }
.hap-season-h h2 { font-size: 13px; letter-spacing: .18em; }
.hap-season-h .hap-muted { font-size: 13px; }

/* Horse cards (mares, foals): the photo and the words, no box around them */
.hap-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 20px; }
.hap-cards--two { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.hap-hcard { position: relative; min-width: 0; text-decoration: none; display: flex; flex-direction: column; background: var(--panel); border: 1px solid var(--rule); border-radius: 8px; overflow: hidden; box-shadow: var(--card-shadow); transition: transform .2s, box-shadow .2s; }
a.hap-hcard:hover { transform: translateY(-2px); box-shadow: var(--card-shadow-up); }
.hap-hcard-ph { display: block; position: relative; aspect-ratio: 25 / 17; background: var(--panel2); overflow: hidden; }
.hap-hcard-ph img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s ease, opacity .3s; }
a.hap-hcard:hover .hap-hcard-ph img { transform: scale(1.03); }
.hap-noimg { width: 100%; height: 100%; display: grid; place-items: center; font: 600 34px/1 var(--caps); letter-spacing: .08em; color: var(--faint); background: var(--panel2); }
.hap-hcard-tx { padding: 16px 18px 18px; }
.hap-hcard h3 { font-family: var(--text); font-size: 18px; font-weight: 600; letter-spacing: -.005em; text-transform: none; line-height: 1.25; }
a.hap-hcard:hover h3 { color: var(--accent); }
.hap-hcard p { margin: 4px 0 12px; color: var(--muted); font-size: 14px; }
.hap-hcard--add { border: 1px dashed var(--fline); box-shadow: none; background: none; display: grid; place-items: center; color: var(--muted); min-height: 200px; aspect-ratio: 25 / 17; font: 600 11px/1 var(--caps); letter-spacing: .18em; text-transform: uppercase; }
.hap-hcard--add:hover { color: var(--accent); border-color: var(--accent); }
.hap-hcard--due .hap-hcard-tx .hap-btn { margin-top: 2px; }
.hap-days { position: absolute; left: 10px; bottom: 10px; display: inline-flex; align-items: baseline; gap: 5px; background: rgba(15,15,15,.5); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); color: rgba(255,255,255,.9); padding: 6px 9px 5px; border-radius: 4px; font: 600 9px/1 var(--caps); letter-spacing: .14em; text-transform: uppercase; }
.hap-days b { font-size: 13px; letter-spacing: .02em; color: #fff; }

/* Lists */
.hap-list { list-style: none; margin: 0; padding: 0; }
.hap-list li { display: flex; gap: 18px; align-items: flex-start; padding: 16px 0; border-top: 1px solid var(--rule); }
.hap-list li:first-child { border-top: 0; padding-top: 2px; }
.hap-list li:last-child { padding-bottom: 0; }
.hap-when { flex: none; width: 46px; text-align: left; color: var(--ink); text-decoration: none; }
.hap-when b { display: block; font: 600 22px/1 var(--caps); letter-spacing: .01em; }
.hap-when span { display: block; margin-top: 5px; font: 600 10px/1 var(--caps); letter-spacing: .18em; text-transform: uppercase; color: var(--accent); }
.hap-when.is-late b, .hap-when.is-late span { color: var(--warn); }
.hap-list-t { flex: 1; min-width: 0; text-decoration: none; }
.hap-list-t b { display: block; font-weight: 600; line-height: 1.35; }
.hap-list-t small { display: block; color: var(--muted); font-size: 14px; margin-top: 2px; }
a.hap-list-t:hover b { color: var(--accent); }
.hap-amt { font: 600 15px/1.4 var(--caps); letter-spacing: .02em; white-space: nowrap; font-feature-settings: "tnum" 1; }
.hap-station-mark { flex: none; width: 46px; height: 46px; display: grid; place-items: center; border: 1px solid var(--fline); font: 600 10px/1 var(--caps); letter-spacing: .1em; color: var(--muted); }

/* Contract rows: ruled lines, not boxes */
.hap-ct { display: grid; grid-template-columns: 84px minmax(0, 1fr) auto; gap: 22px; align-items: center; padding: 20px 0; border-top: 1px solid var(--rule); text-decoration: none; }
.hap-ct:hover .hap-ct-h { color: var(--accent); }
.hap-ct + .hap-ct, .hap-ct + .hap-ct-foot + .hap-ct, .hap-foal-link + .hap-ct { margin-top: 0; }
.hap-ct.is-off { opacity: .6; }
.hap-ct-ph { width: 84px; height: 58px; overflow: hidden; background: var(--panel2); }
.hap-ct-ph img { width: 100%; height: 100%; object-fit: cover; }
.hap-ct-ph .hap-noimg { font-size: 16px; }
.hap-tl .hap-ct { grid-template-columns: minmax(0, 1fr) auto; }
.hap-ct-main { min-width: 0; }
.hap-ct-main .hap-eyebrow { margin-bottom: 7px; }
.hap-ct-h { display: block; font-size: 18px; font-weight: 600; letter-spacing: -.005em; line-height: 1.25; transition: color .15s; }
.hap-ct-meta { display: block; color: var(--muted); font-size: 14px; margin-top: 3px; }
.hap-ct-r { text-align: right; }
.hap-ct-r small { display: block; color: var(--muted); font-size: 13px; margin-top: 10px; font-feature-settings: "tnum" 1; }
.hap-ct-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 0 18px; border-top: 1px dashed var(--rule); font-size: 15px; }
.hap-line { display: flex; gap: 3px; margin-top: 14px; max-width: 420px; }
.hap-line i { flex: 1; height: 2px; background: var(--rule); }
.hap-line i.on { background: var(--ink); }
.hap-line i.on:last-of-type, .hap-line i.on:has(+ i:not(.on)) { background: var(--accent); }
.hap-line-l { display: flex; gap: 3px; max-width: 420px; margin-top: 8px; }
.hap-line-l span { flex: 1; font: 600 9px/1.2 var(--caps); letter-spacing: .12em; text-transform: uppercase; color: var(--faint); }
.hap-line-l span.on { color: var(--ink); }
.hap-filters { display: flex; gap: 26px; flex-wrap: wrap; margin-bottom: 28px; border-bottom: 1px solid var(--rule); }
.hap-filters a { position: relative; color: var(--muted); padding: 0 0 12px; font: 600 11px/1 var(--caps); letter-spacing: .16em; text-transform: uppercase; text-decoration: none; }
.hap-filters a:hover { color: var(--ink); }
.hap-filters a.on { color: var(--ink); }
.hap-filters a.on::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; background: var(--accent); }

/* Home: this season's contracts as cards, like the horse cards */
.hap-sec--cts .hap-ct { background: var(--panel); border: 1px solid var(--rule); border-radius: 8px; padding: 14px 22px 16px 14px; box-shadow: var(--card-shadow); transition: box-shadow .2s, border-color .2s; }
.hap-sec--cts .hap-ct + .hap-ct { margin-top: 12px; }
.hap-sec--cts .hap-ct:hover { box-shadow: var(--card-shadow-up); }
.hap-sec--cts .hap-ct-ph { width: 84px; height: 66px; border-radius: 5px; }
.hap-sec--cts .hap-ct-main .hap-eyebrow { color: var(--accent); }
.hap-sec--cts .hap-ct-h { font-size: 19px; }
.hap-sec--cts .hap-line { gap: 4px; }
.hap-sec--cts .hap-line i { height: 4px; border-radius: 2px; }
.hap-sec--cts .hap-line i.on, .hap-sec--cts .hap-line i.on:has(+ i:not(.on)) { background: var(--accent); }
.hap-sec--cts .hap-line-l { gap: 4px; }

/* Mare and foal pages: the photo at its own shape beside the name (over it on phones) */
.hap-mhero { position: relative; }
.hap-mh-in { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); gap: 56px; align-items: end; padding-top: 52px; padding-bottom: 12px; }
.hap-mh-t { padding-bottom: 6px; }
.hap-mh-t h1 { font-size: clamp(34px, 4.4vw, 56px); letter-spacing: -.01em; line-height: 1.02; }
.hap-ped { font-size: 18px; color: var(--muted); margin: 16px 0 0; }
.hap-ped a { color: var(--ink); text-decoration-color: var(--fline); text-underline-offset: 4px; }
.hap-ped--sm { font-size: 14px; margin-top: 6px; color: var(--faint); }
.hap-mh-ph { margin: 0; position: relative; display: flex; justify-content: flex-end; }
.hap-mh-ph img { width: auto; max-width: 100%; height: auto; max-height: 560px; }
.hap-mh-add { display: grid; place-items: center; width: 100%; aspect-ratio: 25 / 17; border: 1px dashed var(--fline); color: var(--muted); font: 600 11px/1 var(--caps); letter-spacing: .18em; text-transform: uppercase; text-decoration: none; cursor: pointer; }
.hap-mh-add:hover { color: var(--accent); border-color: var(--accent); }
.hap-facts { display: grid; grid-template-columns: auto 1fr; gap: 0 24px; margin: 0; font-size: 15px; }
.hap-facts dt, .hap-facts dd { padding: 10px 0; border-top: 1px solid var(--rule); }
.hap-facts dt:first-of-type, .hap-facts dd:first-of-type { border-top: 0; padding-top: 0; }
.hap-facts dt { font: 600 10px/1.9 var(--caps); letter-spacing: .16em; text-transform: uppercase; color: var(--faint); }
.hap-facts dd { margin: 0; min-width: 0; overflow-wrap: anywhere; font-weight: 500; }
.hap-facts--top { margin-top: 20px; }
.hap-known { padding: 14px 16px; background: var(--panel2); margin-bottom: 18px; }
.hap-docs { list-style: none; margin: 0; padding: 0; }
.hap-docs li { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; padding: 12px 0; border-top: 1px solid var(--rule); font-size: 15px; }
.hap-docs li:first-child { border-top: 0; padding-top: 0; }
.hap-docs li:last-child { padding-bottom: 0; }
.hap-docs li > span { min-width: 0; overflow-wrap: anywhere; }
.hap-docs a { font-weight: 600; text-decoration: none; color: var(--ink); }
.hap-docs a:hover { color: var(--accent); }
.hap-docs small { display: block; color: var(--muted); font-size: 13px; }
.hap-docs form { flex: none; }
/* Her seasons: each year a ruled heading, no dots or line */
.hap-tl { list-style: none; margin: 0; padding: 0; }
.hap-tl > li { padding: 0 0 34px; }
.hap-tl > li:last-child { padding-bottom: 0; }
.hap-tl-yr { font: 600 11px/1 var(--caps); letter-spacing: .2em; text-transform: uppercase; color: var(--faint); padding-bottom: 2px; }
.hap-foal-link { display: flex; gap: 14px; align-items: center; padding: 12px 0; border-top: 1px dashed var(--rule); text-decoration: none; font-size: 15px; }
.hap-foal-link-ph { width: 64px; height: 44px; flex: none; overflow: hidden; }
.hap-foal-link-ph img { width: 100%; height: 100%; object-fit: cover; }
.hap-foal-link-ph .hap-noimg { font-size: 14px; }
.hap-foal-link b { font-weight: 600; }
.hap-foal-link small { display: block; color: var(--muted); font-size: 13px; }
.hap-go { margin-left: auto; color: var(--muted); font: 600 10px/1 var(--caps); letter-spacing: .18em; text-transform: uppercase; white-space: nowrap; }
a:hover > .hap-go { color: var(--accent); }
.hap-lines { list-style: none; margin: 0; padding: 0; font-feature-settings: "tnum" 1; }
.hap-lines li { display: flex; justify-content: space-between; gap: 12px; padding: 11px 0; border-top: 1px solid var(--rule); font-size: 15px; }
.hap-lines li:first-child { border-top: 0; padding-top: 0; }
.hap-lines li small { display: block; color: var(--muted); font-size: 13px; }
.hap-lines li > span:last-child { text-align: right; white-space: nowrap; }
.hap-lines li.is-pay { color: var(--muted); }
.hap-lines li.is-pay form { display: block; }
.hap-lines li.is-tot { border-top: 1px solid var(--line); padding-top: 14px; font: 600 15px/1.4 var(--caps); letter-spacing: .04em; text-transform: uppercase; }
.hap-lines li.is-tot small { font-family: var(--text); text-transform: none; letter-spacing: 0; font-weight: 400; }
.hap-lines li.is-tot > span:last-child { color: var(--accent); }

/* Registration steps */
.hap-regs { list-style: none; margin: 0; padding: 0; }
.hap-regs li { display: flex; gap: 16px; align-items: flex-start; padding: 14px 0; border-top: 1px solid var(--rule); }
.hap-regs li:first-child { border-top: 0; padding-top: 2px; }
.hap-regs li:last-child { padding-bottom: 0; }
.hap-n { flex: none; width: 28px; height: 28px; border-radius: 50%; border: 1px solid var(--fline); display: grid; place-items: center; font: 600 11px/1 var(--caps); color: var(--faint); }
.hap-regs li.done .hap-n { border-color: var(--ok); color: var(--ok); }
.hap-regs li.next .hap-n { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.hap-regs-t { flex: 1; min-width: 0; }
.hap-regs-t b { display: block; font-weight: 600; }
.hap-regs-t small { display: block; color: var(--muted); font-size: 14px; }
.hap-gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 16px; }
.hap-gallery:empty { display: none; }
.hap-gallery figure { margin: 0; }
.hap-gallery img { width: 100%; aspect-ratio: 25 / 17; object-fit: cover; }
.hap-gallery figcaption { font-size: 12px; color: var(--muted); margin-top: 6px; display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.hap-gallery figcaption .hap-linkbtn { font-size: 12px; }
.hap-danger { margin-top: 20px; }
.hap-danger .hap-linkbtn { color: var(--err); }

/* Forms */
.hap-form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px 20px; }
.hap-f { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.hap-full { grid-column: 1 / -1; }
.hap-f label, .hap-label { font: 600 10px/1.3 var(--caps); letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }
.hap-f input[type=text], .hap-f input[type=email], .hap-f input[type=tel], .hap-f input[type=password], .hap-f input[type=date], .hap-f input[type=time], .hap-f input[type=number], .hap-f input[type=search], .hap-f input:not([type]), .hap-f select, .hap-f textarea {
	background: var(--field); color: var(--ink); border: 1px solid var(--fline); padding: 12px 14px; font: 400 16px/1.3 var(--text); width: 100%; min-height: 48px; transition: border-color .15s; }
.hap-f input[readonly] { color: var(--muted); background: var(--panel2); }
.hap-f textarea { min-height: 100px; resize: vertical; }
.hap-f input:focus, .hap-f select:focus, .hap-f textarea:focus { outline: 0; border-color: var(--line); }
.hap-f input[type=file] { color: var(--muted); font-size: 14px; max-width: 100%; }
.hap-f input[type=file]::file-selector-button { background: transparent; color: var(--ink); border: 1px solid var(--line); padding: 10px 14px 9px; margin-right: 12px; font: 600 10px/1 var(--caps); letter-spacing: .14em; text-transform: uppercase; cursor: pointer; }
.hap-f input.is-aqha { border-color: var(--ok); }
.hap-hint { color: var(--muted); font-size: 13px; }
.hap-ferr { color: var(--err); font-size: 14px; font-weight: 600; }
.hap-ferr[hidden] { display: none; }
.hap-subsec { margin-top: 28px; padding-top: 22px; border-top: 1px solid var(--rule); }
.hap-subsec h3 { margin-bottom: 16px; }
.hap-radios { display: flex; gap: 8px; }
.hap-radios label { flex: 1; display: flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid var(--fline); padding: 12px; cursor: pointer; font: 500 15px/1.2 var(--text); letter-spacing: 0; text-transform: none; color: var(--ink); min-height: 48px; background: var(--field); }
.hap-radios input { accent-color: var(--accent); }
.hap-radios label:has(input:checked) { border-color: var(--line); }
.hap-more-form { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--rule); }
.hap-more-form summary { cursor: pointer; font: 600 11px/1.4 var(--caps); letter-spacing: .16em; text-transform: uppercase; color: var(--ink); list-style: none; }
.hap-more-form summary:hover { color: var(--accent); }
.hap-more-form summary::-webkit-details-marker { display: none; }
.hap-more-form summary::before { content: "+"; display: inline-block; width: 18px; color: var(--accent); }
.hap-more-form[open] summary::before { content: "\2212"; }
.hap-more-form form { margin-top: 16px; }
.hap-thumb { max-width: 220px; }
.hap-thumb img { width: 100%; height: auto; }
.hap-preview-img { width: 160px; height: auto; margin-top: 8px; }
form.is-saving { opacity: .6; pointer-events: none; }

/* AQHA search under the mare's name */
.hap-aqha { grid-column: 1 / -1; }
.hap-aqha-list { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 0; border-top: 1px solid var(--rule); }
.hap-aqha-pick { width: 100%; text-align: left; background: none; border: 0; border-bottom: 1px solid var(--rule); color: var(--ink); padding: 13px 0; cursor: pointer; font: inherit; display: grid; gap: 2px; }
.hap-aqha-pick:hover b { color: var(--accent); }
.hap-aqha-pick b { font-weight: 600; }
.hap-aqha-pick span { color: var(--muted); font-size: 14px; }
.hap-aqha-pick em { font-style: normal; color: var(--accent); font: 600 10px/1.6 var(--caps); letter-spacing: .16em; text-transform: uppercase; }
.hap-aqha-ok { padding: 12px 14px; border-left: 3px solid var(--ok); background: var(--panel2); font-size: 15px; }

/* Customize */
.hap-cz { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: 36px; align-items: start; }
.hap-cz form + form { margin-top: 0; }
.hap-cz-photo { aspect-ratio: 16 / 7; overflow: hidden; margin-bottom: 16px; }
.hap-cz-photo img { width: 100%; height: 100%; object-fit: cover; }
.hap-seg { display: inline-flex; gap: 0; border: 1px solid var(--fline); flex-wrap: wrap; }
.hap-seg label { cursor: pointer; }
.hap-seg input { position: absolute; opacity: 0; pointer-events: none; }
.hap-seg span { display: inline-block; padding: 10px 16px 9px; font: 600 10px/1.2 var(--caps); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.hap-seg input:checked + span { background: var(--ink); color: var(--bg); }
.hap-seg input:focus-visible + span { outline: 2px solid var(--accent); }
.hap-swatches { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.hap-sw { position: relative; display: block; border: 1px solid var(--rule); overflow: hidden; cursor: pointer; background: var(--panel); }
.hap-sw input { position: absolute; opacity: 0; pointer-events: none; }
.hap-sw:has(input:checked) { border-color: var(--line); box-shadow: inset 0 0 0 1px var(--line); }
.hap-sw:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }
.hap-sw-chips { display: flex; height: 40px; }
.hap-sw-chips i { flex: 1; }
.hap-sw-name { display: block; padding: 9px 10px 8px; font: 600 10px/1.2 var(--caps); letter-spacing: .12em; text-transform: uppercase; }
.hap-logo-row { display: flex; gap: 18px; align-items: flex-start; }
.hap-logo-row > div { flex: 1; min-width: 0; }
.hap-preview { border: 1px solid var(--rule); overflow: hidden; position: sticky; top: 130px; background: var(--bg); }
.hap-pv-top { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-bottom: 1px solid var(--rule); }
.hap-pv-top .hap-brand-t { font-size: 12px; }
.hap-pv-hero { position: relative; height: 250px; overflow: hidden; display: flex; align-items: flex-end; background: var(--panel2); }
.hap-pv-hero img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: var(--focus, 50% 45%); }
.hap-pv-hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(var(--shade), .94), rgba(var(--shade), 0) 72%), linear-gradient(0deg, rgba(var(--shade), 1), rgba(var(--shade), 0) 48%); }
.hap-pv-hero.hap-hero--plain::after { display: none; }
.hap-pv-hero > div { position: relative; z-index: 2; padding: 20px; }
.hap-pv-hero h3 { font-size: 24px; letter-spacing: .03em; }
.hap-pv-stats { display: grid; grid-template-columns: repeat(3, 1fr); margin: 0 16px 16px; border-top: 1px solid var(--line); }
.hap-pv-stats div { padding: 12px 12px 4px; border-left: 1px solid var(--rule); }
.hap-pv-stats div:first-child { border-left: 0; padding-left: 0; }
.hap-pv-stats span { display: block; font: 600 9px/1.2 var(--caps); letter-spacing: .16em; text-transform: uppercase; color: var(--faint); }
.hap-pv-stats b { font: 600 20px/1.4 var(--caps); }

/* Getting started: three numbered steps across a rule */
.hap-steps-list { list-style: none; counter-reset: s; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; }
.hap-steps-list li { counter-increment: s; padding: 4px 28px 4px 0; display: flex; flex-direction: column; gap: 6px; align-items: flex-start; }
.hap-steps-list li + li { padding-left: 28px; border-left: 1px solid var(--rule); }
.hap-steps-list li::before { content: counter(s, decimal-leading-zero); font: 600 11px/1 var(--caps); letter-spacing: .16em; color: var(--accent); margin-bottom: 8px; }
.hap-steps-list b { font-weight: 600; font-size: 17px; }
.hap-steps-list span { color: var(--muted); font-size: 15px; flex: 1; margin-bottom: 8px; }

/* Menu page (phones) */
.hap-more-who { margin: 0 0 14px; }
.hap-more-who b { display: block; font-size: 18px; font-weight: 600; }
.hap-more-who span { color: var(--muted); font-size: 14px; }
.hap-more { list-style: none; margin: 0 0 18px; padding: 0; }
.hap-more a { display: block; padding: 17px 0; border-top: 1px solid var(--rule); text-decoration: none; font: 600 12px/1 var(--caps); letter-spacing: .16em; text-transform: uppercase; }

/* Sign-in screens */
.hap-body--auth { min-height: 100vh; background: var(--bg); }
.hap-body--auth .hap { padding: 72px 16px 20px; }
.hap-auth { max-width: 440px; margin: 0 auto; }
.hap-wordmark { display: block; text-align: center; font: 600 15px/1 var(--caps); letter-spacing: .32em; text-transform: uppercase; text-decoration: none; color: var(--ink); margin-bottom: 30px; padding-left: .32em; }
.hap-auth-card { background: var(--panel); border: 1px solid var(--rule); border-top: 2px solid var(--accent); padding: 36px 36px 32px; }
.hap-auth-card .hap-h1 { font-size: 24px; letter-spacing: .06em; }
.hap-auth-card .hap-lead { margin-bottom: 24px; font-size: 16px; }
.hap-grid1 { display: grid; gap: 18px; }
.hap-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px 18px; }
.hap-auth .hap-actions { flex-direction: column; align-items: stretch; }
.hap-auth .hap-btn { width: 100%; }
.hap-check { display: flex; gap: 10px; align-items: center; margin-top: 16px; font-size: 15px; color: var(--muted); }
.hap-check input { accent-color: var(--accent); width: 18px; height: 18px; }
.hap-auth-foot { margin: 24px 0 0; padding-top: 20px; border-top: 1px solid var(--rule); color: var(--muted); font-size: 15px; line-height: 1.8; }
.hap-auth-foot a { color: var(--ink); text-decoration-color: var(--accent); text-underline-offset: 4px; }
.hap-agree { margin: 16px 0 0; }
.hap-hp { position: absolute; left: -9999px; }
.hap-turnstile { margin-top: 16px; }

/* Footer */
.hap-foot { margin-top: 88px; border-top: 1px solid var(--rule); color: var(--faint); font-size: 13px; }
.hap-foot-in { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding-top: 24px; padding-bottom: 40px; }
.hap-foot-links { display: flex; gap: 20px; }
.hap-foot a { color: var(--faint); text-decoration: none; }
.hap-foot a:hover { color: var(--ink); }
.hap-body--auth .hap-foot { border-top: 0; margin-top: 30px; }
.hap-body--auth .hap-foot-in { justify-content: center; text-align: center; }

.hap-toast { display: none; }
.hap-tabbar { display: none; }

@media (max-width: 1100px) {
	.hap-nav { gap: 24px; }
	.hap-who > a:first-child { display: none; }
	.hap-grid2 { gap: 32px; }
}
@media (max-width: 980px) {
	.hap-stats { grid-template-columns: repeat(2, 1fr); }
	.hap-grid2, .hap-cz { grid-template-columns: minmax(0, 1fr); }
	.hap-preview { position: static; }
	.hap-steps-list { grid-template-columns: 1fr; }
	.hap-steps-list li { padding: 18px 0; }
	.hap-steps-list li + li { padding-left: 0; border-left: 0; border-top: 1px solid var(--rule); }
}

/* Phones: menu button in the header, tab bar along the bottom, text over photos */
@media (max-width: 860px) {
	.hap-wrap { padding: 0 16px; }
	.hap-navrow, .hap-who, .hap-top-tag { display: none; }
	.hap-top-in { min-height: 58px; justify-content: space-between; gap: 12px; }
	.hap-brand-t { font-size: 12px; max-width: 58vw; }
	.hap-menu-b { display: flex; align-items: center; gap: 8px; font: 600 10px/1 var(--caps); letter-spacing: .16em; text-transform: uppercase; color: var(--ink); text-decoration: none; padding: 8px 0 8px 8px; }
	.hap-hero { min-height: 480px; }
	.hap-hero::after { background: linear-gradient(0deg, rgba(var(--shade), 1) 12%, rgba(var(--shade), .55) 50%, rgba(var(--shade), .05) 100%); }
	.hap-hero--plain { min-height: 280px; }
	.hap-hero-in { padding-bottom: 28px; }
	.hap-hero h1 { font-size: 34px; }
	.hap-stats { gap: 10px; }
	.hap-stat { padding: 16px 16px 18px; }
	.hap-stat b { font-size: 26px; margin-top: 10px; }
	.hap-stat span { font-size: 9px; }
	.hap-sec { padding-top: 46px; }
	.hap-sec-h h2 { font-size: 13px; }
	.hap-cards, .hap-cards--two { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; }
	.hap-hcard-tx { padding: 12px; }
	.hap-sec--cts .hap-ct { padding: 12px; }
	.hap-hcard h3 { font-size: 15px; }
	.hap-hcard p { font-size: 13px; }
	.hap-hcard--add { min-height: 0; }
	.hap-hcard--due .hap-btn { width: 100%; padding: 11px 10px; }
	.hap-ct { grid-template-columns: 56px minmax(0, 1fr); gap: 14px; padding: 16px 0; }
	.hap-ct-ph { width: 56px; height: 56px; }
	.hap-tl .hap-ct { grid-template-columns: 1fr; }
	.hap-ct-r { grid-column: 1 / -1; text-align: left; display: flex; justify-content: space-between; align-items: center; gap: 10px; }
	.hap-ct-r small { margin-top: 0; }
	.hap-ct-h { font-size: 16px; }
	.hap-ct-foot { flex-wrap: wrap; }
	.hap-mh-in { display: block; position: relative; padding: 0; }
	.hap-mhero .hap-wrap.hap-mh-in { padding: 0; }
	.hap-mh-ph { display: block; }
	.hap-mh-ph::after { content: ""; position: absolute; inset: 0; background: linear-gradient(0deg, rgba(var(--shade), 1) 0%, rgba(var(--shade), .7) 40%, rgba(var(--shade), 0) 72%); pointer-events: none; }
	.hap-mh-ph img { width: 100%; max-height: none; aspect-ratio: 4 / 5; object-fit: cover; }
	.hap-mh-ph .hap-mh-add { aspect-ratio: 25 / 17; border: 0; align-items: start; padding-top: 30px; }
	.hap-mh-t { position: absolute; left: 0; right: 0; bottom: 0; z-index: 2; padding: 0 16px 20px; }
	.hap-mh-t h1 { font-size: 30px; }
	.hap-ped { font-size: 15px; margin-top: 8px; }
	.hap-chips { margin-top: 12px; }
	.hap-mh-t .hap-actions { margin-top: 14px; }
	.hap-form-grid, .hap-grid { grid-template-columns: minmax(0, 1fr); }
	.hap-logo-row { flex-direction: column; }
	.hap-swatches { grid-template-columns: repeat(2, 1fr); }
	.hap-gallery { grid-template-columns: repeat(2, 1fr); }
	.hap-phead { padding: 34px 0 22px; }
	.hap-phead h1 { font-size: 28px; }
	.hap-card { padding: 22px 18px; }
	.hap-tabbar { display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 70; background: var(--bg); border-top: 1px solid var(--rule); padding: 4px 4px calc(4px + env(safe-area-inset-bottom)); }
	.hap-tabbar a { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 7px 0 5px; text-decoration: none; color: var(--faint); font: 600 9px/1.2 var(--caps); letter-spacing: .12em; text-transform: uppercase; }
	.hap-tabbar a.is-on { color: var(--ink); }
	.hap-tabbar a.is-on svg { color: var(--accent); }
	body:not(.hap-body--auth) { padding-bottom: calc(64px + env(safe-area-inset-bottom)); }
	.hap-auth-card { padding: 28px 20px 24px; }
	.hap-foot { margin-top: 56px; }
}
@media (max-width: 340px) {
	.hap-cards, .hap-cards--two { grid-template-columns: minmax(0, 1fr); }
}

/* Corners: one small set, so nothing looks softer than anything else.
   Photos 5px; buttons, tags, fields and small boxes 4px; panels 8px. Circles stay round. */
.hap-btn, .hap-btn--sm, .hap-chip, .hap-station-mark, .hap-sw, .hap-seg, .hap-radios label, .hap-f input[type=file]::file-selector-button, .hap-notice, .hap-known, .hap-aqha-ok,
.hap-f input[type=text], .hap-f input[type=email], .hap-f input[type=tel], .hap-f input[type=password], .hap-f input[type=date], .hap-f input[type=time], .hap-f input[type=number], .hap-f input[type=search], .hap-f input:not([type]), .hap-f select, .hap-f textarea { border-radius: 4px; }
.hap-card, .hap-auth-card, .hap-preview { border-radius: 8px; }
.hap-auth-card { border-top-left-radius: 4px; border-top-right-radius: 4px; }
.hap-mh-ph img, .hap-mh-add, .hap-gallery img, .hap-ct-ph, .hap-foal-link-ph, .hap-thumb img, .hap-preview-img, .hap-cz-photo { border-radius: 5px; }
.hap-hcard-ph { border-radius: 0; }
.hap-hcard--add { border-radius: 8px; }
@media (max-width: 860px) {
	.hap-mh-ph img, .hap-mh-ph .hap-mh-add { border-radius: 0; }
}

/* Contract reading: the upload card, the file it read, and fields to check */
.hap-read-row { display: flex; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-top: 16px; }
.hap-read-row .hap-f { flex: 1 1 320px; min-width: 0; }
.hap-read-row .hap-btn { flex: none; }
.hap-read-or { margin: 16px 0 0; }
.hap-btn.is-busy { opacity: .75; cursor: progress; }
.hap-read-file { display: flex; align-items: center; gap: 14px; }
.hap-read-file > span:nth-child(2) { flex: 1; min-width: 0; }
.hap-read-file b { display: block; font-size: 15px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hap-read-file small { display: block; color: var(--muted); font-size: 13px; }
.hap-read-ic { flex: none; width: 44px; height: 44px; display: grid; place-items: center; border: 1px solid var(--fline); border-radius: 4px; color: var(--accent); }
.hap-read-ic svg { width: 20px; height: 20px; }
.hap-read-msg { margin: 16px 0 0; padding-top: 14px; border-top: 1px solid var(--rule); font-size: 15px; }
.hap-f:has([data-check]) input, .hap-f:has([data-check]) select { border-color: #c98a12; box-shadow: inset 3px 0 0 #c98a12; }
.hap-f:has([data-check]) .hap-hint { color: #8a5d00; font-weight: 600; }
@media (max-width: 760px) {
	.hap-read-row .hap-btn { width: 100%; }
}
