/* ==========================================================================
   navybluecolorcode.com — single stylesheet
   Tokens -> base -> layout -> components -> pages -> responsive
   ========================================================================== */

:root {
  /* Core palette, drawn from the navy shades the site documents */
  --ink:        #0A1128;
  --navy:       #14213D;
  --navy-soft:  #1F3B73;
  --navy-line:  #223A5E;
  --blue:       #1B4F8A;
  --blue-lift:  #3A5BA0;
  --brass:      #C9A227;
  --brass-soft: #E7CE7A;

  --paper:      #F4F7FC;
  --surface:    #FFFFFF;
  --surface-2:  #EDF1F8;
  --line:       #DCE4F0;
  --line-soft:  #E9EEF6;

  --text:       #131C33;
  --muted:      #5C6B88;
  --on-dark:    #E7EDF8;
  --on-dark-mut:#A9B8D4;

  --ok:         #17724F;
  --warn:       #8A5A11;

  /* Type */
  --display: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --body: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;

  /* Space + shape */
  --wrap: 1180px;
  --r-sm: 8px;
  --r-md: 14px;
  --r-lg: 22px;
  --shadow-sm: 0 1px 2px rgba(10, 17, 40, .06), 0 2px 8px rgba(10, 17, 40, .05);
  --shadow-md: 0 4px 12px rgba(10, 17, 40, .08), 0 12px 32px rgba(10, 17, 40, .07);
  --shadow-lg: 0 18px 50px rgba(10, 17, 40, .18);
}

/* --------------------------------------------------------------- base --- */

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--text);
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.65;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  font-family: var(--display);
  color: var(--ink);
  line-height: 1.18;
  letter-spacing: -0.012em;
  margin: 0 0 .6em;
  font-weight: 600;
}

h1 { font-size: clamp(1.85rem, 1.25rem + 2.4vw, 3.1rem); }
h2 { font-size: clamp(1.45rem, 1.15rem + 1.3vw, 2.15rem); }
h3 { font-size: clamp(1.12rem, 1rem + .5vw, 1.4rem); }
h4 { font-size: 1.05rem; }

p { margin: 0 0 1.1em; }
ul, ol { margin: 0 0 1.2em; padding-left: 1.2em; }
li { margin-bottom: .4em; }

a { color: var(--blue); text-decoration: underline; text-underline-offset: 2px; text-decoration-thickness: 1px; }
a:hover { color: var(--navy-soft); }

code, pre, .mono { font-family: var(--mono); font-size: .86em; }

code {
  background: var(--surface-2);
  border-radius: 5px;
  padding: .1em .38em;
  color: var(--navy);
}

img, svg { max-width: 100%; height: auto; }

strong { font-weight: 650; }

hr { border: 0; border-top: 1px solid var(--line); margin: 2.5rem 0; }

:focus-visible {
  outline: 3px solid var(--brass);
  outline-offset: 2px;
  border-radius: 4px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--ink);
  color: #fff;
  padding: .7rem 1.1rem;
  z-index: 999;
  border-radius: 0 0 var(--r-sm) 0;
}
.skip-link:focus { left: 0; }

.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ------------------------------------------------------------- layout --- */

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }

.section { padding: clamp(2.6rem, 1.6rem + 3vw, 4.6rem) 0; }
.section.tight { padding: clamp(1.8rem, 1.2rem + 2vw, 3rem) 0; }
.section.alt { background: var(--surface); border-block: 1px solid var(--line-soft); }
.section.deep { background: var(--ink); color: var(--on-dark); }
.section.deep h2, .section.deep h3 { color: #fff; }
.section.deep p { color: var(--on-dark-mut); }
.section.deep a { color: var(--brass-soft); }

.section-head { max-width: 62ch; margin-bottom: 2rem; }
.section-title { margin-bottom: .4rem; }
.section-intro { color: var(--muted); margin: 0; }

.eyebrow {
  display: inline-block;
  font-family: var(--mono);
  font-size: .72rem;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--blue);
  margin-bottom: .7rem;
}
.section.deep .eyebrow { color: var(--brass-soft); }

.prose { max-width: 74ch; }
.prose h2 { margin-top: 2.2rem; }
.prose h3 { margin-top: 1.8rem; }
.prose ul li::marker { color: var(--blue-lift); }

/* ------------------------------------------------------------- header --- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, .88);
  backdrop-filter: saturate(150%) blur(10px);
  -webkit-backdrop-filter: saturate(150%) blur(10px);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 66px;
}

.logo { display: inline-flex; align-items: center; gap: .6rem; text-decoration: none; }
.logo-mark { display: inline-flex; }
.logo-text { display: flex; flex-direction: column; line-height: 1.05; }
.logo-text strong {
  font-family: var(--display);
  font-size: 1.06rem;
  color: var(--ink);
  font-weight: 650;
  letter-spacing: -.01em;
}
.logo-text span {
  font-family: var(--mono);
  font-size: .66rem;
  letter-spacing: .17em;
  text-transform: uppercase;
  color: var(--muted);
}

.primary-nav ul {
  display: flex;
  align-items: center;
  gap: .1rem;
  list-style: none;
  margin: 0;
  padding: 0;
}
.primary-nav a {
  display: block;
  padding: .5rem .62rem;
  font-size: .92rem;
  color: var(--text);
  text-decoration: none;
  border-radius: var(--r-sm);
  white-space: nowrap;
}
.primary-nav a:hover { background: var(--surface-2); color: var(--ink); }
.primary-nav a[aria-current="page"] {
  background: linear-gradient(135deg, var(--blue-lift), var(--blue));
  color: #fff;
  box-shadow: 0 6px 16px rgba(27, 79, 138, .22);
}
.primary-nav a[aria-current="page"]:hover {
  background: linear-gradient(135deg, #466AB1, #163F70);
  color: #fff;
}

.nav-toggle {
  display: none;
  width: 44px; height: 44px;
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: var(--r-sm);
  cursor: pointer;
  padding: 0;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 4px;
}
.nav-toggle-bar {
  display: block;
  width: 18px; height: 2px;
  background: var(--ink);
  border-radius: 2px;
  transition: transform .22s ease, opacity .18s ease;
}
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* --------------------------------------------------------------- hero --- */

.hero {
  background:
    radial-gradient(1100px 420px at 12% -10%, #1E3A6E 0%, transparent 62%),
    linear-gradient(160deg, #0A1128 0%, #14213D 55%, #0D1B3E 100%);
  color: var(--on-dark);
  padding: clamp(2.6rem, 1.6rem + 4vw, 5rem) 0 clamp(2.6rem, 1.6rem + 3vw, 4.2rem);
  border-bottom: 1px solid #223A5E;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(0, .92fr);
  gap: clamp(1.6rem, 1rem + 3vw, 3.4rem);
  align-items: center;
}

.hero h1 { color: #fff; margin-bottom: .55rem; }
.hero h1 .accent {
  background: linear-gradient(100deg, #7FA8E8, #C7D7F5 55%, #7FA8E8);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero-lead { color: #C6D3EC; font-size: 1.06rem; max-width: 54ch; }

.hero-actions { display: flex; flex-wrap: wrap; gap: .7rem; margin-top: 1.4rem; }

.hero-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 1.6rem;
  margin-top: 1.9rem;
  padding-top: 1.4rem;
  border-top: 1px solid rgba(199, 215, 245, .18);
}
.hero-stat strong {
  display: block;
  font-family: var(--display);
  font-size: 1.5rem;
  color: #fff;
  line-height: 1;
}
.hero-stat span {
  font-family: var(--mono);
  font-size: .68rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--on-dark-mut);
}

/* Signature element: a depth chart of navies, lightest at the surface */
.depth-chart {
  border-radius: var(--r-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  border: 1px solid rgba(199, 215, 245, .16);
  background: #0A1128;
}
.depth-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: .8rem 1rem;
  font-family: var(--mono);
  font-size: .68rem;
  letter-spacing: .13em;
  text-transform: uppercase;
  color: var(--on-dark-mut);
  border-bottom: 1px solid rgba(199, 215, 245, .14);
}
.depth-band {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0 1rem;
  height: 54px;
  background: var(--band);
  color: var(--band-text);
  text-decoration: none;
  border: 0;
  width: 100%;
  cursor: pointer;
  font-family: var(--mono);
  font-size: .8rem;
  text-align: left;
  transition: padding-left .22s ease;
}
.depth-band:hover, .depth-band:focus-visible { padding-left: 1.6rem; }
.depth-band .band-name {
  font-family: var(--body);
  font-size: .92rem;
  letter-spacing: .01em;
}
.depth-band .band-hex { opacity: .92; }

/* ------------------------------------------------------------ buttons --- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .78rem 1.3rem;
  border-radius: 999px;
  border: 1px solid transparent;
  font: inherit;
  font-size: .95rem;
  font-weight: 550;
  cursor: pointer;
  text-decoration: none;
  transition: transform .16s ease, background .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

.btn-primary {
  background: linear-gradient(140deg, #3A5BA0, #1B4F8A);
  color: #fff;
  border-color: rgba(127, 168, 232, .35);
  box-shadow: 0 8px 22px rgba(27, 79, 138, .38);
}
.btn-primary:hover {
  background: linear-gradient(140deg, #466AB1, #163F70);
  color: #fff;
  box-shadow: 0 12px 30px rgba(27, 79, 138, .48);
}

.btn-ghost { background: rgba(255, 255, 255, .06); color: #EAF0FC; border-color: rgba(199, 215, 245, .34); }
.btn-ghost:hover { background: rgba(255, 255, 255, .12); color: #fff; }

.btn-solid { background: var(--ink); color: #fff; }
.btn-solid:hover { background: var(--navy); color: #fff; }

.btn-line { background: var(--surface); color: var(--ink); border-color: var(--line); box-shadow: var(--shadow-sm); }
.btn-line:hover { border-color: var(--blue-lift); color: var(--blue); }

.mini {
  font: inherit;
  font-family: var(--mono);
  font-size: .72rem;
  letter-spacing: .06em;
  padding: .42rem .6rem;
  min-height: 34px;
  border-radius: var(--r-sm);
  border: 1px solid var(--line);
  background: var(--surface-2);
  color: var(--navy);
  cursor: pointer;
  transition: background .16s ease, border-color .16s ease, color .16s ease;
}
.mini:hover { background: var(--ink); border-color: var(--ink); color: #fff; }
.mini.ghost { background: transparent; }

/* ------------------------------------------------------- shade cards --- */

.shade-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(212px, 1fr));
  gap: 1.15rem;
}

.shade-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
  display: flex;
  flex-direction: column;
}
.shade-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: #C7D4E8; }
.shade-card[hidden] { display: none; }

.swatch {
  position: relative;
  display: block;
  width: 100%;
  height: 118px;
  border: 0;
  padding: 0;
  cursor: pointer;
  background: var(--swatch);
  color: var(--swatch-text);
  font: inherit;
}

.swatch-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: .45rem;
  opacity: 0;
  transition: opacity .2s ease;
  background: linear-gradient(180deg, rgba(10, 17, 40, .04), rgba(10, 17, 40, .34));
}
.swatch:hover .swatch-overlay,
.swatch:focus-visible .swatch-overlay { opacity: 1; }

.swatch-hex {
  font-family: var(--mono);
  font-size: .92rem;
  letter-spacing: .05em;
  padding: .2rem .55rem;
  border-radius: 6px;
  background: rgba(255, 255, 255, .92);
  color: #0A1128;
  box-shadow: 0 2px 8px rgba(10, 17, 40, .3);
}
.swatch-cta {
  font-size: .76rem;
  font-weight: 600;
  letter-spacing: .05em;
  text-transform: uppercase;
  padding: .3rem .7rem;
  border-radius: 999px;
  background: #0A1128;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, .3);
}

/* Always-visible affordance for touch devices */
.swatch-badge {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  background: rgba(255, 255, 255, .9);
  color: #0A1128;
  box-shadow: 0 1px 4px rgba(10, 17, 40, .25);
  opacity: 0;
  transition: opacity .2s ease;
}
.shade-card:hover .swatch-badge { opacity: 0; }

.shade-body { padding: .85rem .95rem 1rem; display: flex; flex-direction: column; gap: .5rem; flex: 1; }
.shade-name { font-size: 1.03rem; margin: 0; }
.shade-name a { color: var(--ink); text-decoration: none; }
.shade-name a:hover { color: var(--blue); text-decoration: underline; }
.shade-cat {
  margin: 0;
  font-family: var(--mono);
  font-size: .67rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--muted);
}

.shade-values { margin: 0; display: grid; gap: .18rem; }
.shade-values > div { display: flex; justify-content: space-between; gap: .6rem; align-items: baseline; }
.shade-values dt {
  font-family: var(--mono);
  font-size: .66rem;
  letter-spacing: .1em;
  color: var(--muted);
}
.shade-values dd { margin: 0; }
.shade-values code { background: transparent; padding: 0; font-size: .76rem; color: var(--navy); }

.copy-row { display: flex; gap: .35rem; margin-top: auto; padding-top: .3rem; }
.copy-row .mini { flex: 1; text-align: center; }

/* ---------------------------------------------------------- controls --- */

.controls {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 1rem;
  box-shadow: var(--shadow-sm);
  margin-bottom: 1.6rem;
  position: sticky;
  top: 66px;
  z-index: 20;
}
.controls-row { display: grid; grid-template-columns: minmax(200px, 1.6fr) repeat(3, minmax(130px, 1fr)) auto; gap: .7rem; align-items: end; }
.field { display: flex; flex-direction: column; gap: .3rem; min-width: 0; }
.field label {
  font-family: var(--mono);
  font-size: .66rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--muted);
}
.field input, .field select, .field textarea {
  font: inherit;
  font-size: .94rem;
  padding: .62rem .7rem;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  background: var(--surface);
  color: var(--text);
  width: 100%;
}
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--blue-lift); }
.result-count {
  font-family: var(--mono);
  font-size: .76rem;
  color: var(--muted);
  margin: .8rem 0 0;
}
.no-results {
  padding: 2rem;
  text-align: center;
  color: var(--muted);
  background: var(--surface);
  border: 1px dashed var(--line);
  border-radius: var(--r-md);
}

/* ------------------------------------------------------------- toast --- */

.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translate(-50%, 16px);
  background: var(--ink);
  color: #fff;
  padding: .7rem 1.15rem;
  border-radius: 999px;
  font-size: .9rem;
  box-shadow: var(--shadow-lg);
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s ease, transform .2s ease;
  z-index: 200;
  max-width: calc(100vw - 32px);
  text-align: center;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* -------------------------------------------------------- prose parts --- */

.chip {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  padding: .3rem .6rem .3rem .45rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface);
  font: inherit;
  font-size: .85rem;
  cursor: pointer;
  margin: 0 .2rem .35rem 0;
  color: var(--text);
  min-height: 34px;
}
.chip:hover { border-color: var(--blue-lift); }
.chip-dot {
  width: 18px; height: 18px;
  border-radius: 50%;
  background: var(--chip);
  border: 1px solid rgba(10, 17, 40, .18);
  flex: none;
}
.chip code { background: transparent; color: var(--muted); font-size: .78rem; }

.chip-row { display: flex; flex-wrap: wrap; gap: .2rem; margin-bottom: 1.2rem; }

.code-block {
  position: relative;
  background: var(--ink);
  border-radius: var(--r-md);
  margin: 0 0 1.2rem;
  border: 1px solid #223A5E;
}
.code-block pre {
  margin: 0;
  padding: 1rem 4.4rem 1rem 1rem;
  overflow-x: auto;
  color: #DCE6FA;
}
.code-block code { background: transparent; color: inherit; padding: 0; font-size: .82rem; line-height: 1.6; }
.code-block .mini {
  position: absolute;
  top: 10px; right: 10px;
  background: rgba(255, 255, 255, .1);
  border-color: rgba(199, 215, 245, .3);
  color: #EAF0FC;
}
.code-block .mini:hover { background: #fff; color: var(--ink); }

table { width: 100%; border-collapse: collapse; font-size: .93rem; }
th, td { text-align: left; padding: .68rem .7rem; border-bottom: 1px solid var(--line); }
th { font-family: var(--mono); font-size: .7rem; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
tbody tr:hover { background: var(--surface-2); }
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface); margin-bottom: 1.4rem; }
.table-scroll table { min-width: 560px; }
.swatch-cell { display: inline-block; width: 22px; height: 22px; border-radius: 5px; border: 1px solid rgba(10, 17, 40, .18); vertical-align: middle; margin-right: .5rem; }

/* ---------------------------------------------------------- combos ---- */

.combo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 1.15rem; }
.combo-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform .2s ease, box-shadow .2s ease;
}
.combo-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.combo-bars { display: flex; height: 90px; }
.combo-bars span { flex: 1; display: block; transition: flex .25s ease; }
.combo-card:hover .combo-bars span:first-child { flex: 1.6; }
.combo-body { padding: .9rem 1rem 1rem; }
.combo-body h3 { margin: 0 0 .3rem; font-size: 1.05rem; }
.combo-body p { margin: 0 0 .7rem; font-size: .9rem; color: var(--muted); }
.combo-codes { display: flex; flex-wrap: wrap; gap: .35rem; }

/* ---------------------------------------------------------- formats --- */

.card-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(258px, 1fr)); gap: 1.15rem; }
.info-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 1.3rem;
  box-shadow: var(--shadow-sm);
}
.info-card h3 { margin-top: 0; }
.info-card p:last-child { margin-bottom: 0; }
.info-card .val {
  font-family: var(--mono);
  font-size: .84rem;
  display: block;
  background: var(--surface-2);
  border-radius: var(--r-sm);
  padding: .5rem .6rem;
  margin-bottom: .8rem;
  color: var(--navy);
  overflow-x: auto;
}
.section.deep .info-card { background: rgba(255, 255, 255, .05); border-color: rgba(199, 215, 245, .18); }
.section.deep .info-card .val { background: rgba(10, 17, 40, .5); color: #DCE6FA; }
.section.deep .info-card p { color: var(--on-dark-mut); }

/* ------------------------------------------------------------- guide --- */

.post-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(285px, 1fr)); gap: 1.2rem; }
.post-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform .2s ease, box-shadow .2s ease;
}
.post-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.post-swatch { height: 8px; display: block; }
.post-card .inner { padding: 1.15rem; display: flex; flex-direction: column; gap: .5rem; flex: 1; }
.post-card h3 { margin: 0; font-size: 1.12rem; }
.post-card h3 a { color: var(--ink); text-decoration: none; }
.post-card h3 a:hover { color: var(--blue); text-decoration: underline; }
.post-card p { margin: 0; color: var(--muted); font-size: .93rem; }
.post-meta {
  font-family: var(--mono);
  font-size: .68rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--muted);
  margin-top: auto;
  padding-top: .4rem;
}

.breadcrumbs { font-size: .85rem; margin-bottom: 1.4rem; color: var(--muted); }
.breadcrumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: .4rem; margin: 0; padding: 0; }
.breadcrumbs li + li::before { content: "/"; margin-right: .4rem; color: #A9B6CD; }
.breadcrumbs li { margin: 0; }

.page-head {
  background: linear-gradient(165deg, #0A1128, #16264A);
  color: var(--on-dark);
  padding: clamp(2rem, 1.4rem + 2.4vw, 3.4rem) 0 clamp(1.8rem, 1.2rem + 2vw, 2.8rem);
}
.page-head h1 { color: #fff; }
.page-head p { color: #C6D3EC; max-width: 66ch; margin-bottom: 0; }
.page-head .breadcrumbs { color: var(--on-dark-mut); }
.page-head .breadcrumbs a { color: var(--brass-soft); }
.page-head .breadcrumbs li + li::before { color: #6C7FA5; }
.article-meta {
  font-family: var(--mono);
  font-size: .72rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--on-dark-mut);
  margin-top: 1.1rem;
}

.related-list { list-style: none; padding: 0; display: grid; gap: .55rem; }
.related-list a { text-decoration: none; color: var(--ink); }
.related-list a:hover { color: var(--blue); text-decoration: underline; }
.related-list li {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  padding: .7rem .85rem;
  margin: 0;
}

/* --------------------------------------------------------------- faq --- */

.faq-list { display: grid; gap: .7rem; max-width: 80ch; }
.faq {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}
.faq summary {
  cursor: pointer;
  padding: .95rem 2.6rem .95rem 1.1rem;
  font-weight: 600;
  font-size: 1rem;
  position: relative;
  list-style: none;
  color: var(--ink);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+";
  position: absolute;
  right: 1.1rem;
  top: 50%;
  transform: translateY(-50%);
  font-family: var(--mono);
  font-size: 1.2rem;
  color: var(--blue-lift);
}
.faq[open] summary::after { content: "\2212"; }
.faq summary:hover { background: var(--surface-2); }
.faq-answer { padding: 0 1.1rem .3rem; color: var(--muted); }
.faq-answer p { margin-bottom: 1rem; }

/* ------------------------------------------------------- shade detail --- */

.shade-hero { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: clamp(1.4rem, 1rem + 2vw, 2.6rem); align-items: start; }
.big-swatch {
  border-radius: var(--r-lg);
  min-height: 260px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 1.4rem;
  border: 1px solid rgba(10, 17, 40, .16);
  box-shadow: var(--shadow-lg);
  background: var(--swatch);
  color: var(--swatch-text);
}
.big-swatch .bs-hex { font-family: var(--mono); font-size: clamp(1.6rem, 1.1rem + 2vw, 2.4rem); letter-spacing: .04em; }
.big-swatch .bs-label { font-family: var(--mono); font-size: .72rem; letter-spacing: .16em; text-transform: uppercase; opacity: .85; }

.value-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(158px, 1fr)); gap: .7rem; margin-bottom: 1.2rem; }
.value-tile {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: .8rem .9rem;
  box-shadow: var(--shadow-sm);
}
.value-tile dt {
  font-family: var(--mono);
  font-size: .66rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: .25rem;
}
.value-tile dd { margin: 0 0 .55rem; font-family: var(--mono); font-size: .92rem; color: var(--ink); word-break: break-word; }
.value-tile .mini { width: 100%; }

.contrast-demo { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1rem; margin-bottom: 1.2rem; }
.contrast-box { border-radius: var(--r-md); padding: 1.2rem; border: 1px solid var(--line); }
.contrast-box p { margin: 0 0 .5rem; font-size: 1rem; }
.contrast-box .ratio { font-family: var(--mono); font-size: .78rem; opacity: .85; }

.harmony-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: .8rem; }
.harmony-item {
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  overflow: hidden;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}
.harmony-swatch { height: 66px; display: block; width: 100%; border: 0; cursor: pointer; }
.harmony-item .meta { padding: .6rem .7rem .75rem; }
.harmony-item strong { display: block; font-size: .88rem; }
.harmony-item code { font-size: .76rem; background: transparent; padding: 0; color: var(--muted); }

/* -------------------------------------------------------------- form --- */

.form-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: clamp(1.2rem, 1rem + 1vw, 2rem);
  box-shadow: var(--shadow-md);
  max-width: 640px;
}
.form-card .field { margin-bottom: 1rem; }
.form-card textarea { min-height: 150px; resize: vertical; }
.hp-field { position: absolute; left: -9999px; opacity: 0; height: 0; overflow: hidden; }

.alert { border-radius: var(--r-md); padding: .9rem 1.1rem; margin-bottom: 1.2rem; font-size: .95rem; border: 1px solid; }
.alert-ok { background: #E8F5EF; border-color: #B7DFCD; color: var(--ok); }
.alert-err { background: #FCEEEE; border-color: #F0C8C8; color: #9A2B2B; }
.alert ul { margin: .5rem 0 0; padding-left: 1.2rem; }

.field-error { color: #9A2B2B; font-size: .84rem; }

.contact-grid { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, .7fr); gap: 2rem; align-items: start; }

/* --------------------------------------------------------------- 404 --- */

.error-page { text-align: center; padding: clamp(3rem, 2rem + 5vw, 6rem) 0; }
.error-code {
  font-family: var(--mono);
  font-size: clamp(3rem, 2rem + 6vw, 6rem);
  color: var(--navy-soft);
  letter-spacing: .04em;
  line-height: 1;
  margin-bottom: .6rem;
}
.error-swatches { display: flex; justify-content: center; gap: .4rem; margin: 1.8rem 0; flex-wrap: wrap; }
.error-swatches span { width: 46px; height: 46px; border-radius: var(--r-sm); border: 1px solid rgba(10, 17, 40, .12); }


/* -------------------------------------------------------------- footer --- */

.site-footer {
  position: relative;
  overflow: hidden;
  margin-top: clamp(3rem, 2rem + 4vw, 6rem);
  background:
    radial-gradient(circle at 10% 0%, rgba(58, 91, 160, .22), transparent 34rem),
    linear-gradient(145deg, #0A1128 0%, #14213D 52%, #0D1933 100%);
  color: var(--on-dark);
  border-top: 1px solid rgba(127, 168, 232, .2);
}

.site-footer::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 3px;
  background: linear-gradient(90deg, var(--blue-lift), #7FA8E8, var(--navy-soft));
}

.footer-grid {
  position: relative;
  display: grid;
  grid-template-columns: minmax(260px, 1.35fr) repeat(3, minmax(170px, 1fr));
  gap: clamp(2rem, 2vw, 3.5rem);
  padding-top: clamp(3rem, 2rem + 3vw, 5rem);
  padding-bottom: clamp(2.4rem, 1.8rem + 2vw, 3.6rem);
}

.footer-brand { max-width: 37rem; }
.footer-logo { margin-bottom: 1.2rem; }
.footer-logo .logo-text strong { color: #fff; }
.footer-logo .logo-text span { color: #AFC0DE; }
.footer-brand > p {
  max-width: 42ch;
  margin: 0;
  color: var(--on-dark-mut);
  font-size: .96rem;
  line-height: 1.75;
}

.footer-col h2 {
  margin: .15rem 0 1rem;
  color: #fff;
  font-family: var(--body);
  font-size: .77rem;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
}

.footer-col ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.footer-col li { margin: 0; }
.footer-col a {
  display: inline-flex;
  align-items: baseline;
  gap: .42rem;
  padding: .31rem 0;
  color: #CAD6EA;
  font-size: .9rem;
  line-height: 1.45;
  text-decoration: none;
  transition: color .18s ease, transform .18s ease;
}
.footer-col a:hover {
  color: #fff;
  transform: translateX(3px);
}
.footer-col a::before {
  content: "";
  width: 5px;
  height: 5px;
  flex: 0 0 5px;
  border-radius: 50%;
  background: #7FA8E8;
  opacity: .75;
}
.footer-col code {
  background: rgba(255,255,255,.08);
  color: #AFC7EE;
  font-size: .72rem;
  white-space: nowrap;
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1.5rem;
  padding-top: 1.35rem;
  padding-bottom: 1.5rem;
  border-top: 1px solid rgba(220, 228, 240, .14);
}
.footer-bottom p {
  margin: 0;
  color: #AAB9D3;
  font-size: .82rem;
}
.footer-bottom a {
  color: #E5ECF8;
  text-decoration: none;
  font-weight: 650;
}
.footer-bottom a:hover { color: #fff; }
.footer-note { max-width: 62ch; text-align: right; }

@media (max-width: 980px) {
  .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer-brand { grid-column: 1 / -1; }
  .footer-brand > p { max-width: 62ch; }
}

@media (max-width: 680px) {
  .footer-grid { grid-template-columns: 1fr; gap: 1.8rem; }
  .footer-brand { grid-column: auto; }
  .footer-col h2 { margin-bottom: .65rem; }
  .footer-bottom { align-items: flex-start; flex-direction: column; }
  .footer-note { text-align: left; }
}

/* -------------------------------------------------------- responsive --- */

@media (max-width: 1000px) {
  .hero-grid { grid-template-columns: 1fr; }
  .shade-hero { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: 1fr; }
  .controls-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .controls-row .field:first-child { grid-column: 1 / -1; }
  .controls-row > .btn-line { grid-column: 1 / -1; justify-content: center; }
}

@media (max-width: 860px) {
  .nav-toggle { display: inline-flex; }
  .primary-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--surface);
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow-md);
    max-height: 0;
    overflow: hidden;
    visibility: hidden;
    transition: max-height .26s ease, visibility .26s;
  }
  .primary-nav.open { max-height: 70vh; overflow-y: auto; visibility: visible; }
  .primary-nav ul { flex-direction: column; align-items: stretch; gap: 0; padding: .5rem 20px 1rem; }
  .primary-nav li { margin: 0; }
  .primary-nav a { padding: .85rem .4rem; border-bottom: 1px solid var(--line-soft); border-radius: 0; font-size: 1rem; }
  .primary-nav a[aria-current="page"] { box-shadow: none; }
  .header-inner { position: relative; }
  .controls { position: static; }
}

@media (max-width: 620px) {
  body { font-size: 16px; }
  .shade-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: .8rem; }
  .swatch { height: 96px; }
  /* Touch: show the copy affordance permanently, never depend on hover */
  .swatch-badge { opacity: 1; }
  .shade-card:hover .swatch-badge { opacity: 1; }
  .swatch-overlay { opacity: 0; }
  .shade-values > div:nth-child(n+3) { display: none; }
  .copy-row .mini { padding: .5rem .3rem; min-height: 40px; }
  .hero-stats { gap: 1.1rem; }
  .controls-row { grid-template-columns: 1fr; }
  .combo-bars { height: 74px; }
  .code-block pre { padding-right: 1rem; padding-top: 2.8rem; }
  .code-block .mini { top: 8px; right: 8px; }
}

@media (hover: none) {
  /* Pointer devices without hover keep the badge visible at every width */
  .swatch-badge { opacity: 1; }
  .shade-card:hover .swatch-badge { opacity: 1; }
  .swatch:hover .swatch-overlay { opacity: 0; }
  .swatch:focus-visible .swatch-overlay { opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}

@media print {
  .site-header, .site-footer, .controls, .toast, .copy-row, .btn { display: none !important; }
  body { background: #fff; }
}
