/* Groundwork San Antonio — architectural atlas theme
   Bone-white ground, ink plan lines, mineral blue captions. Square edges throughout. */

:root {
  --bone: #f7f4ec;
  --bone-deep: #efeade;
  --paper: #fdfcf8;
  --ink: #14161a;
  --ink-soft: #2b2f36;
  --rule: #14161a;
  --rule-light: #b9b3a4;
  --mineral: #1f4f74;
  --mineral-deep: #143a56;
  --mineral-wash: #e6edf2;
  --flag: #7a2a12;
  --flag-wash: #f7e8e1;
  --ok: #234a2b;
  --ok-wash: #e7efe6;
  --focus: #0a4f8a;
  --maxw: 1180px;
  --gut: clamp(1rem, 3vw, 2.25rem);
  --serif: Georgia, 'Iowan Old Style', 'Times New Roman', Times, serif;
  --sans: 'Helvetica Neue', Helvetica, Arial, system-ui, sans-serif;
  --mono: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
}

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

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

body {
  margin: 0;
  background: var(--bone);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1rem;
  line-height: 1.6;
  text-rendering: optimizeLegibility;
}

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

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--ink);
  color: var(--paper);
  padding: 0.6rem 1rem;
  z-index: 100;
  font-weight: 700;
}
.skip-link:focus { left: 0.5rem; top: 0.5rem; }

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

a { color: var(--mineral-deep); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--ink); }

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

strong { font-weight: 700; }
em { font-style: italic; }

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

/* ---------- Header ---------- */
.site-header {
  background: var(--paper);
  border-bottom: 3px solid var(--rule);
}
.header-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 1rem var(--gut);
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem 2rem;
}
.brand {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(1.2rem, 2.4vw, 1.5rem);
  font-weight: 700;
  letter-spacing: 0.01em;
}
.brand a {
  color: var(--ink);
  text-decoration: none;
  border-bottom: 2px solid var(--ink);
  padding-bottom: 2px;
}
.brand a:hover { border-bottom-color: var(--mineral); color: var(--mineral-deep); }

.site-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.5rem;
}
.site-nav a {
  color: var(--ink-soft);
  text-decoration: none;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  padding: 0.35rem 0;
  border-bottom: 2px solid transparent;
}
.site-nav a:hover { color: var(--ink); border-bottom-color: var(--ink); }
.site-nav a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--mineral); }

/* ---------- Page shell ---------- */
.page {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: clamp(1.5rem, 4vw, 3rem) var(--gut) clamp(2.5rem, 5vw, 4rem);
}

.masthead {
  border-bottom: 1px solid var(--rule);
  padding-bottom: clamp(1.25rem, 3vw, 2rem);
  margin-bottom: clamp(1.5rem, 3vw, 2.25rem);
  max-width: 60rem;
}
.eyebrow {
  margin: 0 0 0.7rem;
  font-family: var(--mono);
  font-size: 0.74rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--mineral-deep);
}
.masthead h1 {
  margin: 0 0 1rem;
  font-family: var(--serif);
  font-weight: 700;
  font-size: clamp(1.7rem, 4.4vw, 2.9rem);
  line-height: 1.1;
  letter-spacing: -0.01em;
  color: var(--ink);
  max-width: 22ch;
}
.lede {
  margin: 0;
  font-size: clamp(1rem, 1.6vw, 1.1rem);
  color: var(--ink-soft);
  max-width: 62ch;
}

h1 { font-family: var(--serif); }

.panel {
  background: var(--paper);
  border: 1px solid var(--rule);
  padding: clamp(1rem, 2.5vw, 1.75rem);
  margin-bottom: 1.5rem;
}
.panel h2 {
  margin: 0 0 0.9rem;
  font-family: var(--serif);
  font-size: clamp(1.2rem, 2.2vw, 1.45rem);
  line-height: 1.2;
  color: var(--ink);
  border-left: 6px solid var(--mineral);
  padding-left: 0.7rem;
}
.panel p { max-width: 70ch; }

.ticks {
  margin: 0;
  padding: 0;
  list-style: none;
}
.ticks li {
  position: relative;
  padding: 0.45rem 0 0.45rem 1.7rem;
  border-top: 1px dotted var(--rule-light);
  color: var(--ink-soft);
  max-width: 72ch;
}
.ticks li:first-child { border-top: 0; }
.ticks li::before {
  content: "";
  position: absolute;
  left: 0.35rem;
  top: 1rem;
  width: 0.55rem;
  height: 0.55rem;
  border: 2px solid var(--mineral);
  background: var(--mineral-wash);
}

.notice {
  border-color: var(--flag);
  background: var(--flag-wash);
}
.notice h2 { border-left-color: var(--flag); }

/* ---------- Form ---------- */
fieldset {
  margin: 0 0 1.5rem;
  padding: 0;
  border: 0;
  min-width: 0;
}
legend {
  font-family: var(--serif);
  font-size: clamp(1.25rem, 2.3vw, 1.5rem);
  font-weight: 700;
  color: var(--ink);
  padding: 0;
  margin-bottom: 0.5rem;
}
fieldset[disabled] { opacity: 0.92; }
.fieldset-note {
  margin: 0 0 1.25rem;
  color: var(--ink-soft);
  font-size: 0.95rem;
  max-width: 70ch;
}

.proposal-names {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.field { display: flex; flex-direction: column; gap: 0.35rem; min-width: 0; }
.field label {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

input[type="text"],
select,
textarea {
  font: inherit;
  color: var(--ink);
  background: var(--bone);
  border: 1.5px solid var(--ink);
  border-radius: 0;
  padding: 0.5rem 0.55rem;
  width: 100%;
  min-width: 0;
}
input[type="text"]:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
  background: var(--paper);
}
input::placeholder { color: #5a5f66; opacity: 1; }
textarea { resize: vertical; margin-top: 0.35rem; }

/* ---------- Matrix ---------- */
.matrix-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; border: 1px solid var(--rule); }

.matrix {
  width: 100%;
  border-collapse: collapse;
  min-width: 640px;
  background: var(--paper);
}
.matrix caption {
  caption-side: top;
  text-align: left;
  padding: 0.7rem 0.85rem;
  font-size: 0.85rem;
  color: var(--mineral-deep);
  border-bottom: 1px solid var(--rule-light);
  background: var(--mineral-wash);
}
.matrix th,
.matrix td {
  border-top: 1px solid var(--rule-light);
  padding: 0.7rem 0.85rem;
  text-align: left;
  vertical-align: top;
}
.matrix thead th {
  background: var(--ink);
  color: var(--paper);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border-top: 0;
  vertical-align: bottom;
}
.matrix tbody th {
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--ink);
  background: var(--bone-deep);
  width: 40%;
}
.matrix tbody th .hint {
  display: block;
  font-weight: 400;
  font-size: 0.8rem;
  line-height: 1.4;
  color: var(--ink-soft);
  margin-top: 0.2rem;
}
.matrix tbody tr:nth-child(even) td { background: #faf8f2; }
.matrix td select,
.matrix td input[type="text"] { font-size: 0.95rem; }
.matrix td input[type="text"] { max-width: 8rem; }

.caption-note {
  display: none;
  margin: 0.6rem 0 1.5rem;
  font-size: 0.82rem;
  color: var(--ink-soft);
}

/* ---------- Actions ---------- */
.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.5rem;
}
.btn {
  font: inherit;
  font-weight: 700;
  font-size: 0.92rem;
  letter-spacing: 0.03em;
  padding: 0.7rem 1.2rem;
  border: 2px solid var(--ink);
  border-radius: 0;
  background: var(--paper);
  color: var(--ink);
  cursor: pointer;
}
.btn:hover:not(:disabled) { background: var(--bone-deep); }
.btn:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.btn:disabled { cursor: not-allowed; opacity: 0.55; background: var(--bone-deep); color: var(--ink-soft); border-color: var(--ink-soft); }
.btn-primary { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.btn-primary:hover:not(:disabled) { background: var(--mineral-deep); border-color: var(--mineral-deep); color: #fff; }
.btn-quiet { background: transparent; border-color: var(--ink-soft); color: var(--ink-soft); }
.btn-quiet:hover:not(:disabled) { background: var(--bone-deep); color: var(--ink); }

.inline-status {
  margin: 0.9rem 0 0;
  min-height: 1.4em;
  font-size: 0.9rem;
  color: var(--mineral-deep);
}

/* ---------- Results ---------- */
.results-panel { min-height: 4rem; }
.empty {
  margin: 0;
  color: var(--ink-soft);
  font-style: italic;
}

/* ---------- Link list ---------- */
.link-list {
  list-style: none;
  margin: 0 0 1.25rem;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0;
  border-top: 1px solid var(--rule-light);
}
.link-list li {
  border-bottom: 1px solid var(--rule-light);
  padding: 0.6rem 0.9rem 0.6rem 0;
}
.link-list li:nth-child(odd) { border-right: 1px solid var(--rule-light); padding-right: 1rem; }
.link-list a { font-weight: 600; }

.fine {
  font-size: 0.85rem;
  color: var(--ink-soft);
  border-top: 1px solid var(--rule-light);
  padding-top: 0.9rem;
  margin: 0;
  max-width: 74ch;
}

/* ---------- Footer ---------- */
.site-footer {
  background: var(--ink);
  color: var(--bone);
  border-top: 3px solid var(--mineral);
}
.footer-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: clamp(1.5rem, 3vw, 2.25rem) var(--gut);
}
.footer-brand {
  margin: 0 0 0.85rem;
  font-family: var(--serif);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--paper);
}
.footer-nav ul {
  list-style: none;
  margin: 0 0 1rem;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1.5rem;
}
.footer-nav a {
  color: var(--bone);
  font-size: 0.85rem;
  text-decoration: none;
  border-bottom: 1px solid transparent;
  padding: 0.15rem 0;
}
.footer-nav a:hover { color: #fff; border-bottom-color: var(--bone); }
.footer-nav a:focus-visible { outline: 3px solid #9cc4e4; outline-offset: 2px; }
.footer-note {
  margin: 0;
  font-size: 0.82rem;
  line-height: 1.5;
  color: #e6e1d4;
  max-width: 72ch;
}

/* ---------- Article surfaces ---------- */
.article { max-width: var(--maxw); margin: 0 auto; padding: clamp(1.5rem, 4vw, 3rem) var(--gut) clamp(2.5rem, 5vw, 4rem); }
.article-header {
  border-bottom: 2px solid var(--rule);
  padding-bottom: 1.25rem;
  margin-bottom: 1.5rem;
  max-width: 46rem;
}
.article-header .eyebrow { margin-bottom: 0.6rem; }
.article-header h1 {
  margin: 0 0 0.75rem;
  font-family: var(--serif);
  font-size: clamp(1.6rem, 4vw, 2.5rem);
  line-height: 1.12;
  color: var(--ink);
}
.article-header .standfirst {
  margin: 0;
  font-size: 1.05rem;
  color: var(--ink-soft);
  max-width: 60ch;
}
.article-body { max-width: 46rem; }
.article-body h2 {
  margin: 2rem 0 0.6rem;
  font-family: var(--serif);
  font-size: clamp(1.2rem, 2.4vw, 1.5rem);
  line-height: 1.2;
}
.article-body h3 {
  margin: 1.5rem 0 0.4rem;
  font-family: var(--sans);
  font-size: 1.02rem;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--mineral-deep);
}
.article-body p, .article-body li { color: var(--ink-soft); }
.article-body ul, .article-body ol { padding-left: 1.3rem; }
.article-body li { margin: 0.35rem 0; }
.article-body blockquote {
  margin: 1.25rem 0;
  padding: 0.5rem 1rem;
  border-left: 5px solid var(--mineral);
  background: var(--mineral-wash);
  color: var(--ink);
}
.article-body table {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0 1.5rem;
  font-size: 0.94rem;
}
.article-body th, .article-body td {
  border: 1px solid var(--rule-light);
  padding: 0.55rem 0.65rem;
  text-align: left;
  vertical-align: top;
}
.article-body thead th { background: var(--ink); color: var(--paper); }
.article-body tbody th { background: var(--bone-deep); }

/* ---------- Responsive: 900px ---------- */
@media (max-width: 900px) {
  .proposal-names { grid-template-columns: 1fr; }
  .link-list { grid-template-columns: 1fr; }
  .link-list li:nth-child(odd) { border-right: 0; padding-right: 0; }
}

/* ---------- Responsive: 640px — matrix becomes labeled rows ---------- */
@media (max-width: 640px) {
  .header-inner { flex-direction: column; align-items: flex-start; gap: 0.5rem; }
  .site-nav ul { gap: 0.15rem 1rem; }

  .caption-note { display: block; }
  .matrix-scroll { overflow-x: visible; border: 0; }
  .matrix { min-width: 0; display: block; }
  .matrix caption { display: block; border: 1px solid var(--rule); }
  .matrix thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .matrix tbody, .matrix tr, .matrix th, .matrix td { display: block; width: 100%; }
  .matrix tbody th {
    border: 1px solid var(--rule);
    border-bottom: 0;
    background: var(--ink);
    color: var(--paper);
    padding: 0.6rem 0.7rem;
  }
  .matrix tbody th .hint { color: #e6e1d4; }
  .matrix tr {
    margin: 0 0 1rem;
    border-bottom: 0;
  }
  .matrix td {
    border: 1px solid var(--rule);
    border-top: 0;
    background: var(--paper) !important;
    padding: 0.55rem 0.7rem 0.65rem;
  }
  .matrix td::before {
    content: attr(data-label);
    display: block;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--mineral-deep);
    margin-bottom: 0.25rem;
  }
  .matrix td input[type="text"] { max-width: 100%; }

  .actions { flex-direction: column; align-items: stretch; }
  .btn { width: 100%; }

  .article-body table { font-size: 0.88rem; }
}

@media (max-width: 420px) {
  body { font-size: 0.97rem; }
  .panel { padding: 0.9rem; }
  .masthead h1 { max-width: none; }
}

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

/* ---------- Print ---------- */
@media print {
  .site-header, .site-footer, .actions, .skip-link { display: none; }
  body { background: #fff; color: #000; }
  .panel { border-color: #000; }
}

/* Verified layout corrections */
.site-footer .footer-publisher a{color:#f7f6ef}.article-body a,.source-table a{overflow-wrap:anywhere}.source-table{width:100%;table-layout:fixed;overflow-wrap:anywhere}

.article-body{overflow-wrap:anywhere;word-break:normal}
