/* ============================================================
   Loomé & Rug — measurement-first rug sizing guides
   Palette: warm ivory ground, clay terracotta, sage, brushed gold
   Type:    Newsreader (display) / Inter (body) / IBM Plex Mono (dimensions)
   ============================================================ */

:root {
  --paper:      #FBF8F3;
  --ivory:      #F5EFE6;
  --ivory-deep: #EBE2D3;
  --clay:       #A9503A;
  --clay-deep:  #853D2C;
  --sage:       #7C8B6F;
  --sage-pale:  #E4E8DD;
  --gold:       #B08D4F;
  --ink:        #2B2622;
  --ink-soft:   #6E655B;
  --rule:       #DCD1BF;

  --measure: 40rem;
  --wide: 68rem;

  --f-display: "Newsreader", Georgia, "Times New Roman", serif;
  --f-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --f-mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

body {
  margin: 0;
  background: var(--ivory);
  color: var(--ink);
  font-family: var(--f-body);
  font-size: 1.0625rem;
  line-height: 1.68;
  -webkit-font-smoothing: antialiased;
}

/* ---------- Dimension type: the signature ---------- */
/* Every measurement on this site is set as a drafting annotation. */
.dim {
  font-family: var(--f-mono);
  font-size: 0.92em;
  font-weight: 500;
  letter-spacing: -0.01em;
  color: var(--clay-deep);
  white-space: nowrap;
}

.eyebrow {
  font-family: var(--f-mono);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--sage);
  margin: 0 0 0.9rem;
}

/* ---------- Structure ---------- */
.wrap { width: 100%; max-width: var(--wide); margin: 0 auto; padding: 0 1.5rem; }
.col  { width: 100%; max-width: var(--measure); margin: 0 auto; }

.skip {
  position: absolute; left: -9999px;
  background: var(--ink); color: var(--paper);
  padding: .6rem 1rem; z-index: 100;
}
.skip:focus { left: 1rem; top: 1rem; }

/* ---------- Header ---------- */
.masthead {
  border-bottom: 1px solid var(--rule);
  background: var(--paper);
}
.masthead-inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1.5rem; padding: 1.1rem 1.5rem;
  max-width: var(--wide); margin: 0 auto; flex-wrap: wrap;
}
.wordmark {
  font-family: var(--f-display);
  font-size: 1.4rem; font-weight: 400; letter-spacing: -0.015em;
  color: var(--ink); text-decoration: none; line-height: 1;
}
.wordmark span { color: var(--clay); }
.nav { display: flex; gap: 1.4rem; flex-wrap: wrap; }
.nav a {
  font-family: var(--f-mono);
  font-size: .74rem; letter-spacing: .1em; text-transform: uppercase;
  color: var(--ink-soft); text-decoration: none;
  padding-bottom: 2px; border-bottom: 1px solid transparent;
}
.nav a:hover, .nav a:focus-visible { color: var(--clay); border-bottom-color: var(--clay); }

/* ---------- Hero ---------- */
.hero { padding: 4.5rem 0 3rem; }
.hero-grid {
  display: grid; gap: 3rem;
  grid-template-columns: 1fr;
  align-items: center;
}
@media (min-width: 62rem) {
  .hero-grid { grid-template-columns: 1fr 1.05fr; gap: 4rem; }
}
.hero h1 {
  font-family: var(--f-display);
  font-weight: 300;
  font-size: clamp(2.3rem, 6vw, 3.6rem);
  line-height: 1.06;
  letter-spacing: -0.022em;
  margin: 0 0 1.2rem;
}
.hero h1 em { font-style: italic; color: var(--clay); }
.hero-lede { font-size: 1.15rem; color: var(--ink-soft); margin: 0 0 2rem; max-width: 34rem; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  font-family: var(--f-mono);
  font-size: .78rem; letter-spacing: .1em; text-transform: uppercase;
  padding: .85rem 1.4rem;
  background: var(--clay); color: var(--paper);
  text-decoration: none; border: 1px solid var(--clay);
  transition: background .18s ease, color .18s ease;
}
.btn:hover, .btn:focus-visible { background: var(--clay-deep); border-color: var(--clay-deep); }
.btn-ghost { background: transparent; color: var(--clay); }
.btn-ghost:hover, .btn-ghost:focus-visible { background: var(--clay); color: var(--paper); }

/* ---------- Scale figure (the signature element) ---------- */
.figure {
  margin: 2.6rem 0;
  background: var(--paper);
  border: 1px solid var(--rule);
  padding: 1.5rem;
}
.figure svg { display: block; width: 100%; height: auto; }
.figure figcaption {
  font-family: var(--f-mono);
  font-size: .74rem; line-height: 1.6; color: var(--ink-soft);
  margin-top: 1rem; padding-top: .9rem; border-top: 1px solid var(--rule);
}
.figure-wide { max-width: none; }

/* SVG drawing conventions */
.s-room  { fill: var(--ivory-deep); stroke: var(--ink); stroke-width: 2; }
.s-rug   { fill: var(--clay); fill-opacity: .17; stroke: var(--clay); stroke-width: 2; }
.s-rug-b { fill: var(--sage); fill-opacity: .2; stroke: var(--sage); stroke-width: 2; stroke-dasharray: 6 4; }
.s-furn  { fill: var(--paper); stroke: var(--ink-soft); stroke-width: 1.5; }
.s-lead  { stroke: var(--gold); stroke-width: 1; }
.s-label { font-family: var(--f-mono); font-size: 12px; fill: var(--ink); }
.s-label-sm { font-family: var(--f-mono); font-size: 10.5px; fill: var(--ink-soft); }
.s-label-clay { font-family: var(--f-mono); font-size: 12px; fill: var(--clay-deep); }

/* ---------- Rule / section ---------- */
.band { padding: 3.5rem 0; border-top: 1px solid var(--rule); }
.band-paper { background: var(--paper); }
.band h2 {
  font-family: var(--f-display); font-weight: 400;
  font-size: clamp(1.6rem, 3.4vw, 2.15rem); line-height: 1.15;
  letter-spacing: -0.018em; margin: 0 0 1.6rem;
}

/* ---------- Guide index ---------- */
.guides { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--rule); }
.guides li { border-bottom: 1px solid var(--rule); }
.guides a {
  display: grid; gap: .3rem 1.5rem; padding: 1.5rem 0;
  text-decoration: none; color: inherit;
  grid-template-columns: 1fr;
  transition: padding-left .18s ease;
}
@media (min-width: 46rem) {
  .guides a { grid-template-columns: 7rem 1fr; align-items: baseline; }
}
.guides a:hover, .guides a:focus-visible { padding-left: .6rem; }
.guides a:hover .g-title, .guides a:focus-visible .g-title { color: var(--clay); }
.g-key {
  font-family: var(--f-mono); font-size: .74rem; letter-spacing: .06em;
  color: var(--sage); text-transform: uppercase; padding-top: .35rem;
}
.g-title {
  font-family: var(--f-display); font-size: 1.32rem; font-weight: 400;
  line-height: 1.25; letter-spacing: -0.012em; margin: 0 0 .3rem;
}
.g-note { font-size: .95rem; color: var(--ink-soft); margin: 0; }

/* ---------- Article ---------- */
.article { padding: 3.5rem 0 1rem; }
.article h1 {
  font-family: var(--f-display); font-weight: 300;
  font-size: clamp(2rem, 5vw, 3rem); line-height: 1.08;
  letter-spacing: -0.022em; margin: 0 0 1.1rem;
}
.article-lede { font-size: 1.16rem; color: var(--ink-soft); margin: 0 0 1.6rem; }
.byline {
  font-family: var(--f-mono); font-size: .72rem; letter-spacing: .08em;
  text-transform: uppercase; color: var(--sage);
  padding-top: 1.2rem; border-top: 1px solid var(--rule);
}
.prose { padding-bottom: 3rem; }
.prose h2 {
  font-family: var(--f-display); font-weight: 400;
  font-size: 1.62rem; line-height: 1.2; letter-spacing: -0.015em;
  margin: 2.8rem 0 .9rem;
}
.prose h3 {
  font-family: var(--f-body); font-weight: 600;
  font-size: 1.05rem; letter-spacing: .002em;
  margin: 2rem 0 .5rem;
}
.prose p { margin: 0 0 1.15rem; }
.prose ul, .prose ol { margin: 0 0 1.3rem; padding-left: 1.2rem; }
.prose li { margin-bottom: .55rem; }
.prose a { color: var(--clay-deep); text-decoration-thickness: 1px; text-underline-offset: 2px; }
.prose a:hover, .prose a:focus-visible { color: var(--clay); }
.prose strong { font-weight: 600; }

/* Rule callout — the one number that matters */
.rule-card {
  background: var(--sage-pale);
  border-left: 3px solid var(--sage);
  padding: 1.3rem 1.4rem;
  margin: 2rem 0;
}
.rule-card .eyebrow { color: var(--sage); margin-bottom: .5rem; }
.rule-card p { margin: 0; font-size: 1.05rem; }
.rule-card p + p { margin-top: .7rem; }

/* Data table */
.tbl-wrap { overflow-x: auto; margin: 1.8rem 0; }
table { width: 100%; border-collapse: collapse; font-size: .96rem; }
caption {
  font-family: var(--f-mono); font-size: .72rem; letter-spacing: .1em;
  text-transform: uppercase; color: var(--sage);
  text-align: left; padding-bottom: .7rem;
}
th, td { text-align: left; padding: .72rem .8rem; border-bottom: 1px solid var(--rule); }
th {
  font-family: var(--f-mono); font-size: .72rem; font-weight: 500;
  letter-spacing: .07em; text-transform: uppercase; color: var(--ink-soft);
  border-bottom: 1px solid var(--ink-soft);
}
tbody tr:nth-child(odd) { background: var(--paper); }
td:first-child { font-weight: 500; }

/* Disclosure strip */
.disclosure {
  font-size: .88rem; color: var(--ink-soft);
  background: var(--paper); border: 1px solid var(--rule);
  padding: .85rem 1rem; margin: 0 0 2.4rem;
}
.disclosure a { color: var(--clay-deep); }

/* Next-read */
.next {
  border-top: 1px solid var(--rule);
  padding-top: 1.8rem; margin-top: 1rem;
}
.next .eyebrow { margin-bottom: .7rem; }
.next-links { display: grid; gap: 1rem; }
@media (min-width: 40rem) { .next-links { grid-template-columns: 1fr 1fr; gap: 1.5rem; } }
.next-links a {
  font-family: var(--f-display); font-size: 1.15rem; line-height: 1.3;
  color: var(--ink); text-decoration: none;
  border-bottom: 1px solid var(--rule); padding-bottom: .8rem;
}
.next-links a:hover, .next-links a:focus-visible { color: var(--clay); border-bottom-color: var(--clay); }

/* ---------- Footer ---------- */
.foot {
  border-top: 1px solid var(--rule);
  background: var(--paper);
  padding: 2.8rem 0 3.2rem;
  font-size: .9rem; color: var(--ink-soft);
}
.foot-grid { display: grid; gap: 2rem; }
@media (min-width: 46rem) { .foot-grid { grid-template-columns: 1.4fr 1fr 1fr; gap: 3rem; } }
.foot h3 {
  font-family: var(--f-mono); font-size: .72rem; letter-spacing: .12em;
  text-transform: uppercase; color: var(--sage); font-weight: 500;
  margin: 0 0 .9rem;
}
.foot ul { list-style: none; margin: 0; padding: 0; }
.foot li { margin-bottom: .5rem; }
.foot a { color: var(--ink-soft); text-decoration: none; border-bottom: 1px solid var(--rule); }
.foot a:hover, .foot a:focus-visible { color: var(--clay); border-bottom-color: var(--clay); }
.foot-fine { margin-top: 2.4rem; padding-top: 1.4rem; border-top: 1px solid var(--rule); font-size: .82rem; }

:focus-visible { outline: 2px solid var(--clay); outline-offset: 3px; }

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