/* Tool Library design system.
   Warm paper background, white cards, serif display type, mono micro-labels.
   Fonts are bundled locally (assets/fonts) so the hub works with no internet. */

@font-face { font-family: 'Inter'; src: url('../fonts/inter-400.woff2') format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Inter'; src: url('../fonts/inter-500.woff2') format('woff2'); font-weight: 500; font-display: swap; }
@font-face { font-family: 'Inter'; src: url('../fonts/inter-600.woff2') format('woff2'); font-weight: 600; font-display: swap; }
@font-face { font-family: 'Inter'; src: url('../fonts/inter-700.woff2') format('woff2'); font-weight: 700; font-display: swap; }
@font-face { font-family: 'Montserrat'; src: url('../fonts/montserrat-400.woff2') format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Montserrat'; src: url('../fonts/montserrat-500.woff2') format('woff2'); font-weight: 500; font-display: swap; }
@font-face { font-family: 'Montserrat'; src: url('../fonts/montserrat-600.woff2') format('woff2'); font-weight: 600; font-display: swap; }
@font-face { font-family: 'Montserrat'; src: url('../fonts/montserrat-700.woff2') format('woff2'); font-weight: 700; font-display: swap; }
@font-face { font-family: 'Geist Mono'; src: url('../fonts/geistmono-400.woff2') format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Geist Mono'; src: url('../fonts/geistmono-500.woff2') format('woff2'); font-weight: 500; font-display: swap; }

:root {
  --paper: #f7f3ef;
  --paper-sunk: #f0ebe3;
  --card: #ffffff;
  --ink: #1a1a1a;
  /* Sampled from the Progressive & Lee logo: the primary colour. */
  --brand: #054780;
  --brand-dark: #03335d;
  --ink-soft: #6f7275;
  --ink-faint: #989a9c;
  --line: #e7e2da;
  --line-strong: #d6d7d7;
  --blue: #94c4ff;
  --purple: #c1aaf9;
  --amber: #ffc53d;
  --green: #bdee63;
  --pink: #f3dded;
  --danger: #c0442f;
  --radius: 20px;
  --radius-sm: 12px;
  --pill: 100px;
  --sans: 'Inter', -apple-system, 'Segoe UI', Arial, sans-serif;
  /* Montserrat is the brand face; --display is used for headings. */
  --display: 'Montserrat', 'Inter', Arial, sans-serif;
  --mono: 'Geist Mono', ui-monospace, 'Cascadia Mono', Consolas, monospace;
  --shadow: 0 1px 2px rgba(15, 10, 0, .04), 0 8px 24px rgba(15, 10, 0, .05);
}

* { box-sizing: border-box; }

/* Component display rules below would otherwise override the hidden attribute. */
[hidden] { display: none !important; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; }

/* ---------- layout ----------
   Content spans the screen with a 15% gutter each side. --gutter is one value
   so the header and the page body always line up. */
:root { --gutter: 15%; }
@media (max-width: 900px) { :root { --gutter: 7%; } }
@media (max-width: 600px) { :root { --gutter: 16px; } }

.tp-shell { width: 100%; margin: 0; padding: 0 var(--gutter) 72px; }

.tp-topbar {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  margin: 0; padding: 22px var(--gutter) 26px;
}
.tp-topbar__logo { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.tp-topbar__logo img { display: block; height: 26px; width: auto; }
.tp-topbar__divider { width: 1px; height: 20px; background: var(--line-strong); }
.tp-topbar__name { font-family: var(--display); font-weight: 600; font-size: 16px; letter-spacing: -.01em; color: var(--ink-soft); }
.tp-topbar__nav { display: flex; align-items: center; gap: 22px; }
.tp-topbar__nav a { color: var(--ink-soft); font-size: 14px; font-weight: 500; text-decoration: none; }
.tp-topbar__nav a:hover { color: var(--ink); }

.tp-hero { padding: 26px 0 34px; }
.tp-hero h1 {
  margin: 0 0 10px; font-family: var(--display); font-weight: 700;
  font-size: clamp(28px, 4.3vw, 44px); line-height: 1.12; letter-spacing: -.02em;
  text-wrap: balance;
}
/* No width cap: subtitles read as a single line instead of breaking early. */
.tp-hero p { margin: 0; color: var(--ink-soft); font-size: 17px; }

/* ---------- micro label ---------- */
.tp-eyebrow {
  margin: 0 0 10px; color: var(--ink-faint);
  font-family: var(--mono); font-size: 11px; font-weight: 500;
  letter-spacing: .1em; text-transform: uppercase;
}

/* ---------- cards ---------- */
.tp-card {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow);
}
.tp-card + .tp-card { margin-top: 18px; }
.tp-card__title { margin: 0 0 4px; font-family: var(--display); font-weight: 600; font-size: 19px; line-height: 1.25; letter-spacing: -.01em; }
.tp-card__hint { margin: 0 0 18px; color: var(--ink-soft); font-size: 14px; }

/* ---------- hub grid ---------- */
.tp-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 18px; }
.tp-tool {
  display: flex; flex-direction: column; min-height: 210px; padding: 22px;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  text-decoration: none; color: inherit; box-shadow: var(--shadow);
  transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease;
}
.tp-tool:hover { transform: translateY(-3px); border-color: var(--line-strong); box-shadow: 0 2px 4px rgba(15,10,0,.05), 0 18px 38px rgba(15,10,0,.09); }
.tp-tool__icon {
  display: grid; place-items: center; width: 52px; height: 52px; margin-bottom: 16px;
  background: var(--accent, var(--paper-sunk)); border-radius: 14px;
}
.tp-tool__icon svg { width: 28px; height: 28px; }
.tp-tool__name { margin: 0 0 6px; font-family: var(--display); font-weight: 600; font-size: 17px; line-height: 1.3; letter-spacing: -.01em; }
.tp-tool__desc { margin: 0; color: var(--ink-soft); font-size: 14px; }
.tp-tool__go { margin-top: auto; padding-top: 16px; font-size: 14px; font-weight: 500; }
.tp-tool--soon { opacity: .58; cursor: default; }
.tp-tool--soon:hover { transform: none; box-shadow: var(--shadow); border-color: var(--line); }
.tp-tag {
  display: inline-block; padding: 3px 10px; border-radius: var(--pill);
  background: var(--paper-sunk); color: var(--ink-soft);
  font-family: var(--mono); font-size: 10px; letter-spacing: .08em; text-transform: uppercase;
}

/* ---------- forms ---------- */
.tp-field { margin-bottom: 14px; }
.tp-field > label,
.tp-legend { display: block; margin-bottom: 6px; font-size: 13px; font-weight: 600; }
.tp-optional { color: var(--ink-faint); font-weight: 400; }
.tp-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.tp-row--phone { grid-template-columns: 2fr .9fr 2fr; }
.tp-row--thirds { grid-template-columns: 1fr 1fr 1fr; }
@media (max-width: 620px) { .tp-row, .tp-row--phone, .tp-row--thirds { grid-template-columns: 1fr; } }

input[type="text"], input[type="tel"], input[type="email"], input[type="password"], select, textarea {
  width: 100%; padding: 10px 12px; background: #fff;
  border: 1px solid var(--line-strong); border-radius: var(--radius-sm);
  color: var(--ink); font: 400 15px var(--sans);
}
textarea { min-height: 90px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--brand); outline-offset: 1px; border-color: var(--brand); }
input::placeholder { color: #b6b2ab; }
select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%236f7275' stroke-width='1.6' stroke-linecap='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; background-size: 11px; padding-right: 32px; }

.tp-check { display: flex; align-items: center; gap: 9px; margin-bottom: 14px; }
.tp-check input { width: 17px; height: 17px; accent-color: var(--brand); }
.tp-check label { margin: 0; font-size: 14px; font-weight: 400; }

.tp-note { margin: 6px 0 0; color: var(--ink-soft); font-size: 12.5px; }
.tp-note--warn { color: var(--danger); }

/* ---------- chips ---------- */
.tp-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.tp-chip {
  display: inline-flex; align-items: center; gap: 7px; padding: 8px 15px;
  background: #fff; border: 1px solid var(--line-strong); border-radius: var(--pill);
  color: var(--ink); font: 500 14px var(--sans); cursor: pointer;
}
.tp-chip:hover { border-color: var(--brand); color: var(--brand); }
.tp-chip[aria-pressed="true"] { background: var(--brand); border-color: var(--brand); color: #fff; }
.tp-chip__mark { font-size: 12px; }

/* ---------- buttons ---------- */
.tp-btn {
  display: inline-flex; align-items: center; gap: 8px; padding: 11px 22px;
  background: var(--brand); border: 1px solid var(--brand); border-radius: var(--pill);
  color: #fff; font: 500 15px var(--sans); cursor: pointer; text-decoration: none;
  transition: background .15s ease, color .15s ease;
}
.tp-btn:hover { background: var(--brand-dark); border-color: var(--brand-dark); color: #fff; }
.tp-btn--ghost { background: transparent; color: var(--brand); }
.tp-btn--ghost:hover { background: var(--brand); color: #fff; }
.tp-btn--link { padding: 0; border: 0; background: none; color: var(--brand); font-weight: 500; font-size: 14px; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.tp-btn:disabled { opacity: .45; cursor: not-allowed; }
.tp-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 4px; }
.tp-status { color: var(--ink-soft); font-size: 14px; }
.tp-status--ok { color: #2f7d4f; }
.tp-status--bad { color: var(--danger); }

/* ---------- repeatable url rows ---------- */
.tp-url-row { display: flex; gap: 8px; margin-bottom: 8px; }
.tp-url-row input { flex: 1; }
.tp-icon-btn {
  flex: 0 0 auto; width: 42px; height: 42px; padding: 0;
  background: #fff; border: 1px solid var(--line-strong); border-radius: var(--radius-sm);
  color: var(--ink-soft); font: 400 18px var(--sans); cursor: pointer;
}
.tp-icon-btn:hover { border-color: var(--brand); color: var(--brand); }

/* ---------- preview ---------- */
.tp-preview {
  overflow-x: auto; padding: 26px; background: #fff;
  border: 1px solid var(--line); border-radius: var(--radius);
}
.tp-preview--sunk { background: var(--paper-sunk); }

/* ---------- misc ---------- */
.tp-banner {
  display: flex; gap: 10px; align-items: flex-start; margin-bottom: 18px; padding: 14px 16px;
  background: #fff8e6; border: 1px solid #f0dca8; border-radius: var(--radius-sm); font-size: 14px;
}
.tp-banner--info { background: #eef4ff; border-color: #cfdcf7; }
.tp-back { display: inline-block; margin-bottom: 6px; color: var(--ink-soft); font-size: 14px; text-decoration: none; }
.tp-back:hover { color: var(--ink); }
.tp-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
