/* Drizzle Partner Program styles. Tokens copied from drizzletech.net (site/app/globals.css). */
:root {
  --ink: #0B0B0C;
  --white: #FFFFFF;
  --red: #F90016;
  --red-button: #EB0015;
  --red-deep: #C80012;
  --red-text: #B0000F;
  --red-soft: #FF4D5A;
  --red-tint: #FFE3E5;
  --paper: #F4F4F2;
  --line-dark: #232326;
  --panel: #151517;
  --panel-card: #1E1E22;
  --panel-line: #2E2E33;
  --muted-dark: #A8A8AE;
  --text-on-dark: #C9C9C9;
  --eyebrow-dark: #BDBDBD;
  --link-dark: #E6E6E6;
  --faint-dark: #8F8F8F;
  --line-light: #DEDEDA;
  --body-light: #2B2B2B;
  --eyebrow-light: #5A5A5A;
  --ok: #1E7A3C;
  --ok-tint: #E2F4E8;
  --warn: #8A5A00;
  --warn-tint: #FFF1D6;
  --font-sans: 'Archivo', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font-sans); background: var(--paper); color: var(--ink); font-size: 17px; line-height: 1.55; }
a { color: var(--red-text); font-weight: 700; }
a:hover { color: var(--red-deep); }
img { max-width: 100%; }
h1, h2, h3 { margin: 0; line-height: 1.12; }
h1 { font-size: clamp(32px, 4vw, 48px); font-weight: 900; letter-spacing: -0.01em; }
h2 { font-size: clamp(24px, 2.6vw, 32px); font-weight: 900; }
h3 { font-size: 20px; font-weight: 800; }
p { margin: 0; }
code, .mono { font-family: var(--font-mono); font-size: 0.88em; }

.skip-link { position: absolute; left: 16px; top: -100px; z-index: 100; background: var(--white); color: var(--ink); padding: 12px 18px; border-radius: 4px; font-weight: 700; text-decoration: none; }
.skip-link:focus { top: 16px; }
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible, summary:focus-visible { outline: 3px solid var(--red-button); outline-offset: 2px; }

/* ---------- Header ---------- */
.top { background: var(--ink); color: var(--white); border-bottom: 1px solid var(--line-dark); }
.top__inner { max-width: 1280px; margin: 0 auto; padding: 18px 32px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px 28px; }
.top__brand { display: flex; align-items: center; gap: 14px; text-decoration: none; color: var(--white); }
.top__brand img { height: 38px; width: auto; display: block; }
.top__brand span { font-size: 14px; letter-spacing: 0.24em; font-weight: 700; text-transform: uppercase; color: var(--eyebrow-dark); border-left: 1px solid var(--panel-line); padding-left: 14px; }
.top__nav { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 22px; font-size: 15px; font-weight: 600; }
.top__nav a { color: var(--link-dark); text-decoration: none; font-weight: 600; padding: 6px 0; border-bottom: 2px solid transparent; }
.top__nav a:hover { color: var(--white); }
.top__nav a[aria-current="page"] { color: var(--white); border-bottom-color: var(--red); }
.top__nav form { margin: 0; }
.top__nav .linkish { color: var(--muted-dark); font-weight: 600; font-size: 15px; }

/* ---------- Layout ---------- */
.wrap { max-width: 1280px; margin: 0 auto; padding: 40px 32px 72px; }
.stack { display: flex; flex-direction: column; gap: 24px; }
.stack-sm { display: flex; flex-direction: column; gap: 12px; }
.row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.between { justify-content: space-between; }
.grid { display: grid; gap: 20px; grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr)); }
.grid-2 { display: grid; gap: 20px; grid-template-columns: repeat(auto-fit, minmax(min(420px, 100%), 1fr)); }
.page-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px; }
.eyebrow { font-size: 13px; letter-spacing: 0.28em; font-weight: 700; text-transform: uppercase; color: var(--eyebrow-light); }
.muted { color: var(--eyebrow-light); }
.small { font-size: 14px; }
.lede { font-size: 19px; color: var(--body-light); max-width: 760px; }

.card { background: var(--white); border: 1px solid var(--line-light); border-radius: 6px; padding: 24px; display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.card--flush { padding: 0; overflow: hidden; }
.card--dark { background: var(--panel); border-color: var(--panel-line); color: var(--white); }
.card h3 + p { color: var(--body-light); }

.stat { display: flex; flex-direction: column; gap: 4px; }
.stat__label { font-size: 13px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--eyebrow-light); }
.stat__value { font-size: 30px; font-weight: 900; letter-spacing: -0.01em; font-variant-numeric: tabular-nums; }
.stat__note { font-size: 14px; color: var(--eyebrow-light); }
.stats { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(min(180px, 100%), 1fr)); }

/* ---------- Buttons and forms ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 0 22px; border-radius: 4px; border: 2px solid transparent; font: inherit; font-size: 16px; font-weight: 800; text-decoration: none; cursor: pointer; }
.btn--primary { background: var(--red-button); color: var(--white); }
.btn--primary:hover { background: var(--red-deep); color: var(--white); }
.btn--dark { background: var(--ink); color: var(--white); }
.btn--dark:hover { background: #2A2A2F; color: var(--white); }
.btn--outline { background: transparent; border-color: currentColor; color: var(--ink); }
.btn--outline-light { background: transparent; border-color: var(--white); color: var(--white); }
.btn--outline-light:hover { color: var(--white); background: rgba(255,255,255,0.08); }
.btn--small { min-height: 36px; padding: 0 14px; font-size: 14px; }
.btn--lg { min-height: 56px; padding: 0 30px; font-size: 17px; }
.btn:disabled { opacity: 0.55; cursor: not-allowed; }
.linkish { background: none; border: 0; padding: 0; font: inherit; color: var(--red-text); font-weight: 700; cursor: pointer; text-decoration: underline; }

form { margin: 0; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field label, .field legend { font-size: 15px; font-weight: 700; }
.field .hint { font-size: 14px; color: var(--eyebrow-light); }
input[type=text], input[type=email], input[type=url], input[type=number], input[type=search], input[type=date], select, textarea {
  font: inherit; font-size: 16px; color: var(--ink); background: var(--white); border: 1px solid #BDBDB8; border-radius: 4px; min-height: 46px; padding: 8px 12px; width: 100%;
}
textarea { min-height: 110px; resize: vertical; }
fieldset { border: 0; padding: 0; margin: 0; }
.checks { display: flex; flex-wrap: wrap; gap: 10px 22px; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 16px; font-weight: 500; }
.check input { width: 20px; height: 20px; margin-top: 2px; accent-color: var(--red-button); flex: none; }
.form-grid { display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr)); }
.form-grid .full { grid-column: 1 / -1; }
.inline-form { display: inline-flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.inline-form input, .inline-form select { width: auto; min-height: 36px; padding: 4px 8px; font-size: 14px; }

/* ---------- Notices and pills ---------- */
.notice { border-radius: 6px; padding: 14px 18px; font-size: 16px; border: 1px solid var(--line-light); background: var(--white); }
.notice--ok { background: var(--ok-tint); border-color: #B7E0C4; color: #124D26; }
.notice--warn { background: var(--warn-tint); border-color: #F0D08F; color: #5C3D00; }
.notice--bad { background: var(--red-tint); border-color: #F5B3B9; color: var(--red-text); }
.pill { display: inline-block; font-size: 12px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; padding: 4px 9px; border-radius: 3px; background: #ECECE8; color: var(--body-light); white-space: nowrap; }
.pill--red { background: var(--red-tint); color: var(--red-text); }
.pill--ok { background: var(--ok-tint); color: var(--ok); }
.pill--warn { background: var(--warn-tint); color: var(--warn); }
.pill--dark { background: var(--ink); color: var(--white); }

/* ---------- Tables ---------- */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table { border-collapse: collapse; width: 100%; font-size: 15px; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line-light); vertical-align: top; }
th { font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--eyebrow-light); font-weight: 800; background: #FAFAF8; white-space: nowrap; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
tr:last-child td { border-bottom: 0; }
tfoot td { font-weight: 800; border-top: 2px solid var(--ink); }

/* ---------- Progress ---------- */
.progress { height: 12px; background: #E7E7E3; border-radius: 6px; overflow: hidden; }
.progress > span { display: block; height: 100%; background: var(--red-button); border-radius: 6px; }

/* ---------- Calendar chart ---------- */
.cal { display: grid; grid-template-columns: repeat(24, minmax(28px, 1fr)); gap: 4px; align-items: end; min-width: 760px; }
.cal__col { display: flex; flex-direction: column; align-items: stretch; gap: 6px; }
.cal__bar { height: 150px; display: flex; flex-direction: column-reverse; justify-content: flex-start; gap: 2px; border-bottom: 1px solid #C9C9C4; }
.cal__bar > .cal__seg:last-child { border-radius: 4px 4px 0 0; }
.cal__col:hover .cal__bar { filter: brightness(0.92); }
.cal__col { cursor: default; }
.cal__seg { display: block; width: 100%; }
.seg-paid { background: var(--ink); }
.seg-approved { background: var(--red-button); }
.seg-pending { background: #F7A8AF; }
.seg-projected { background: repeating-linear-gradient(135deg, #8F8F8A 0 2px, #E4E4E0 2px 7px); }
.cal__label { font-size: 11px; text-align: center; color: var(--eyebrow-light); white-space: nowrap; }
.cal__col--now .cal__label { color: var(--ink); font-weight: 800; }
.legend { display: flex; flex-wrap: wrap; gap: 8px 18px; font-size: 14px; color: var(--body-light); }
.legend i { display: inline-block; width: 12px; height: 12px; border-radius: 2px; margin-right: 6px; vertical-align: -1px; }

/* ---------- Copy boxes ---------- */
.copy { display: flex; gap: 8px; align-items: stretch; }
.copy input, .copy textarea { font-family: var(--font-mono); font-size: 14px; background: #FAFAF8; }
.copy textarea { min-height: 96px; }
.copy .btn { flex: none; }

/* ---------- App rows ---------- */
.app-logo { height: 28px; width: auto; display: block; }
.app-logo--sq { height: 40px; }
.app-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }

/* ---------- Public page ---------- */
.hero { background: var(--ink); color: var(--white); position: relative; overflow: hidden; }
.hero__inner { max-width: 1280px; margin: 0 auto; padding: 96px 32px 104px; display: flex; flex-direction: column; gap: 24px; position: relative; }
.hero__title { font-size: clamp(42px, 5.4vw, 76px); line-height: 1.02; font-weight: 900; letter-spacing: -0.02em; max-width: 900px; }
.hero__title span { color: var(--red); }
.hero__lede { font-size: 21px; color: var(--text-on-dark); max-width: 640px; }
.hero__shape { position: absolute; right: -90px; top: 40px; width: 520px; height: 380px; background: var(--red); clip-path: polygon(0 40%, 100% 0, 100% 60%, 0 100%); opacity: 0.9; }
@media (max-width: 900px) { .hero__shape { opacity: 0.18; } }
.section { padding: 88px 32px; }
.section--white { background: var(--white); }
.section--dark { background: var(--ink); color: var(--white); }
.section__inner { max-width: 1280px; margin: 0 auto; display: flex; flex-direction: column; gap: 40px; }
.steps { display: grid; gap: 32px; grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr)); }
.step { border-top: 3px solid var(--ink); padding-top: 20px; display: flex; flex-direction: column; gap: 10px; }
.step__num { font-size: 15px; font-weight: 800; letter-spacing: 0.16em; color: var(--red-text); }
.step p { color: var(--body-light); }
.level-table td, .level-table th { font-size: 17px; padding: 16px; }
.level-table td:first-child { font-weight: 800; }
.who { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr)); }
.who div { background: var(--panel-card); border: 1px solid var(--panel-line); border-radius: 6px; padding: 18px 20px; font-weight: 700; }
.mark { width: 34px; height: 30px; background: var(--red); clip-path: polygon(0 40%, 100% 0, 100% 60%, 0 100%); }

/* ---------- Legal ---------- */
.legal { max-width: 860px; display: flex; flex-direction: column; gap: 40px; }
.legal section { border-top: 3px solid var(--ink); padding-top: 20px; display: flex; flex-direction: column; gap: 14px; }
.legal p, .legal li { color: var(--body-light); line-height: 1.7; }
.legal ul, .legal ol { margin: 0; padding-left: 24px; display: flex; flex-direction: column; gap: 8px; }

/* ---------- Footer ---------- */
.foot { background: var(--ink); color: #A8A8A8; border-top: 1px solid var(--line-dark); font-size: 14px; }
.foot__inner { max-width: 1280px; margin: 0 auto; padding: 32px; display: flex; flex-wrap: wrap; gap: 12px 28px; justify-content: space-between; align-items: center; }
.foot a { color: var(--link-dark); font-weight: 600; text-decoration: none; }
.foot nav { display: flex; flex-wrap: wrap; gap: 8px 22px; }

/* ---------- Badges page ---------- */
.badge-preview { display: flex; flex-wrap: wrap; gap: 16px; align-items: center; }
.badge-preview .on-dark { background: var(--ink); padding: 14px; border-radius: 6px; }
.badge-preview .on-light { background: var(--white); border: 1px solid var(--line-light); padding: 14px; border-radius: 6px; }

/* ---------- Phones ---------- */
@media (max-width: 640px) {
  .top__inner, .wrap, .hero__inner { padding-left: 16px; padding-right: 16px; }
  .section { padding: 64px 16px; }
  .wrap { padding-top: 28px; }
  .card { padding: 18px; }
  .copy { flex-direction: column; }
  .top__brand span { display: none; }
  .hero__inner { padding-top: 64px; padding-bottom: 72px; }
}

/* Calendar hover tooltip: every column has data-tip with its month's numbers. */
.cal__col { position: relative; }
.cal__col[data-tip]:hover::after, .cal__col[data-tip]:focus::after {
  content: attr(data-tip); position: absolute; bottom: calc(100% + 6px); left: 50%; transform: translateX(-50%);
  background: var(--ink); color: var(--white); font-size: 12px; line-height: 1.5; white-space: pre; padding: 8px 10px; border-radius: 4px; z-index: 5; pointer-events: none; box-shadow: 0 6px 18px rgba(0,0,0,0.25);
}
.cal__col:first-child[data-tip]:hover::after, .cal__col:nth-child(2)[data-tip]:hover::after { left: 0; transform: none; }
.cal__col:last-child[data-tip]:hover::after, .cal__col:nth-last-child(2)[data-tip]:hover::after { left: auto; right: 0; transform: none; }
.cal-scroll { overflow-x: auto; padding-top: 110px; margin-top: -100px; }

/* Logo sizes: wide wordmarks are capped so all four apps look about the same size. */
.app-logo { max-width: 170px; object-fit: contain; object-position: left center; }
img.app-logo[src*="turnaround"] { height: 18px; }
/* Footer stays at the bottom of short pages. */
body { min-height: 100vh; display: flex; flex-direction: column; }
body > main { flex: 1 0 auto; }
