/* linked.zone — shared stylesheet
   Roles: display = Bricolage Grotesque, body = Source Serif 4, data = IBM Plex Mono
   Colour encodes RDF term role: --class for types/classes, --prop for properties/predicates. */

:root {
  --paper:   #e7eaee;
  --surface: #f7f8fa;
  --ink:     #12141a;
  --muted:   #5b6373;
  --line:    #ccd2db;
  --class:   #1b6e61;   /* rdfs:Class-ish terms */
  --prop:    #5340c8;   /* rdf:Property-ish terms */
  --sel:     #dfe4ea;

  --measure: 34rem;
  --gutter: clamp(1.25rem, 4vw, 3.5rem);

  --t-xs:  0.72rem;
  --t-sm:  0.82rem;
  --t-base: clamp(1.02rem, 0.99rem + 0.15vw, 1.12rem);
  --t-lg:  clamp(1.25rem, 1.15rem + 0.5vw, 1.5rem);
  --t-xl:  clamp(1.75rem, 1.4rem + 1.6vw, 2.6rem);
  --t-2xl: clamp(2.4rem, 1.7rem + 3.2vw, 4.4rem);

  --display: "Bricolage Grotesque", ui-sans-serif, system-ui, sans-serif;
  --body: "Source Serif 4", Georgia, serif;
  --data: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper:   #0e1015;
    --surface: #161a21;
    --ink:     #e6e9ee;
    --muted:   #98a2b3;
    --line:    #272d38;
    --class:   #5cc9b4;
    --prop:    #a794ff;
    --sel:     #232a35;
  }
}

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

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--body);
  font-size: var(--t-base);
  line-height: 1.6;
  font-variant-numeric: tabular-nums;
}

::selection { background: var(--sel); }

a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 0.18em; }
a:hover { text-decoration-color: var(--prop); }

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

.skip {
  position: absolute; left: -9999px;
  background: var(--ink); color: var(--paper);
  padding: 0.5rem 0.9rem; font-family: var(--data); font-size: var(--t-sm);
}
.skip:focus { left: var(--gutter); top: 0.75rem; z-index: 10; }

.wrap {
  max-width: 62rem;
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* ---------- masthead ---------- */

.masthead {
  border-bottom: 1px solid var(--line);
  padding-block: clamp(1.75rem, 4vw, 3rem) 1.5rem;
}

.masthead .wrap {
  display: grid;
  gap: clamp(1.5rem, 4vw, 3rem);
  grid-template-columns: 1fr;
  align-items: start;
}

@media (min-width: 54rem) {
  .masthead .wrap { grid-template-columns: minmax(0, 1fr) 22rem; }
}

.wordmark {
  display: inline-block;
  font-family: var(--display);
  font-weight: 700;
  font-size: var(--t-xl);
  letter-spacing: -0.04em;
  line-height: 1;
  text-decoration: none;
}
.wordmark span { color: var(--prop); }

.tagline {
  margin: 0.75rem 0 0;
  max-width: 30rem;
  color: var(--muted);
  font-size: var(--t-base);
}

/* Signature element: the @prefix block doubles as topic navigation. */

.vocab-label {
  margin: 0 0 0.6rem;
  font-family: var(--data);
  font-size: var(--t-xs);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

.prefix-block {
  margin: 0;
  padding: 0.9rem 1rem;
  list-style: none;
  background: var(--surface);
  border: 1px solid var(--line);
  font-family: var(--data);
  font-size: var(--t-sm);
  line-height: 2.1;
  overflow-x: auto;
  white-space: nowrap;
}

.kw { color: var(--muted); }
.iri { color: var(--muted); }

.curie {
  font: inherit;
  color: var(--prop);
  background: none;
  border: 0;
  border-bottom: 1px dotted currentColor;
  padding: 0.1rem 0.15rem;
  cursor: pointer;
}
.curie[aria-pressed="true"] {
  background: var(--prop);
  color: var(--paper);
  border-bottom-color: transparent;
}
@media (prefers-color-scheme: dark) {
  .curie[aria-pressed="true"] { color: #0e1015; }
}

/* ---------- feature note ---------- */

.feature {
  padding-block: clamp(2.5rem, 7vw, 5rem) clamp(2rem, 5vw, 3.5rem);
  border-bottom: 1px solid var(--line);
}

.eyebrow {
  margin: 0 0 1.25rem;
  font-family: var(--data);
  font-size: var(--t-xs);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

.feature-title {
  margin: 0;
  font-family: var(--display);
  font-weight: 700;
  font-size: var(--t-2xl);
  line-height: 1.02;
  letter-spacing: -0.035em;
  max-width: 18ch;
}
.feature-title a { text-decoration: none; }
.feature-title a:hover { text-decoration: underline; text-decoration-thickness: 2px; }

.feature-dek {
  margin: 1.25rem 0 1.75rem;
  max-width: var(--measure);
  font-size: var(--t-lg);
  color: var(--muted);
}

/* ---------- the triple line ---------- */

.triple {
  font-family: var(--data);
  font-size: var(--t-sm);
  line-height: 1.9;
  color: var(--muted);
  overflow-x: auto;
  white-space: nowrap;
  padding-bottom: 0.2rem;
}
.triple .s { color: var(--ink); }
.triple .p { color: var(--prop); }
.triple .o { color: var(--class); }
.triple a { text-decoration: none; border-bottom: 1px dotted currentColor; }

/* ---------- note list ---------- */

.notes { padding-block: clamp(2rem, 5vw, 3.5rem); }

.notes-head {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.5rem;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 0.5rem;
}

.notes-head h2 {
  margin: 0;
  font-family: var(--data);
  font-weight: 500;
  font-size: var(--t-xs);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

.count { font-family: var(--data); font-size: var(--t-xs); color: var(--muted); }

.note-list { list-style: none; margin: 0; padding: 0; }

.note {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.4rem 2rem;
  padding-block: clamp(1.5rem, 3vw, 2.25rem);
  border-top: 1px solid var(--line);
}

@media (min-width: 42rem) {
  .note { grid-template-columns: 8.5rem minmax(0, 1fr); }
}

.note-meta {
  font-family: var(--data);
  font-size: var(--t-xs);
  color: var(--muted);
  line-height: 1.7;
}
.note-meta .type { display: block; color: var(--class); }

.note-title {
  margin: 0;
  font-family: var(--display);
  font-weight: 600;
  font-size: var(--t-lg);
  line-height: 1.15;
  letter-spacing: -0.02em;
}
.note-title a { text-decoration: none; }
.note-title a:hover { text-decoration: underline; }

.note-dek {
  margin: 0.5rem 0 0.9rem;
  max-width: var(--measure);
  color: var(--muted);
}

.note[hidden] { display: none; }

.empty {
  padding-block: 3rem;
  font-family: var(--data);
  font-size: var(--t-sm);
  color: var(--muted);
}

/* ---------- article ---------- */

.article { padding-block: clamp(2.5rem, 6vw, 4.5rem) 2rem; }

.article-head { max-width: 46rem; }

.article-title {
  margin: 0;
  font-family: var(--display);
  font-weight: 700;
  font-size: var(--t-2xl);
  line-height: 1.03;
  letter-spacing: -0.035em;
  max-width: 20ch;
}

.article-dek {
  margin: 1.1rem 0 1.75rem;
  max-width: var(--measure);
  font-size: var(--t-lg);
  color: var(--muted);
}

.byline {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1.25rem;
  margin: 0 0 1.5rem;
  padding-block: 0.85rem;
  border-block: 1px solid var(--line);
  font-family: var(--data);
  font-size: var(--t-xs);
  color: var(--muted);
}
.byline dt { display: none; }
.byline dd { margin: 0; }
.byline .k { color: var(--prop); }

.prose { max-width: var(--measure); }

.prose > * + * { margin-top: 1.15em; }

.prose h2 {
  margin-top: 2.5em;
  font-family: var(--display);
  font-weight: 600;
  font-size: var(--t-lg);
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.prose h3 {
  margin-top: 2em;
  font-family: var(--display);
  font-weight: 600;
  font-size: 1.05em;
}

.prose a { text-decoration-color: var(--prop); }

.prose code {
  font-family: var(--data);
  font-size: 0.86em;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 2px;
  padding: 0.08em 0.3em;
}

.prose pre {
  margin-inline: 0;
  padding: 1.1rem 1.2rem;
  background: var(--surface);
  border: 1px solid var(--line);
  overflow-x: auto;
  font-size: var(--t-sm);
  line-height: 1.65;
}
.prose pre code { background: none; border: 0; padding: 0; font-size: inherit; }

.prose blockquote {
  margin-inline: 0;
  padding-left: 1.1rem;
  border-left: 2px solid var(--prop);
  color: var(--muted);
}

.prose figure { margin-inline: 0; }
.prose figcaption {
  margin-top: 0.6rem;
  font-family: var(--data);
  font-size: var(--t-xs);
  color: var(--muted);
}

/* Turtle token colours, applied by hand in the markup. */
.tok-pfx { color: var(--muted); }
.tok-p   { color: var(--prop); }
.tok-o   { color: var(--class); }
.tok-lit { color: var(--ink); }

/* ---------- terms aside ---------- */

.terms {
  max-width: var(--measure);
  margin-top: 3rem;
  padding: 1.1rem 1.2rem;
  background: var(--surface);
  border: 1px solid var(--line);
}
.terms h2 {
  margin: 0 0 0.75rem;
  font-family: var(--data);
  font-weight: 500;
  font-size: var(--t-xs);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}
.terms ul { margin: 0; padding: 0; list-style: none; font-family: var(--data); font-size: var(--t-sm); line-height: 2; }
.terms .term { color: var(--class); }
.terms .gloss { color: var(--muted); }

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

.site-foot {
  border-top: 1px solid var(--line);
  padding-block: 2.5rem 3.5rem;
  font-family: var(--data);
  font-size: var(--t-sm);
  color: var(--muted);
}

.foot-grid {
  display: grid;
  gap: 1.75rem;
  grid-template-columns: 1fr;
}
@media (min-width: 42rem) {
  .foot-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

.foot-grid h2 {
  margin: 0 0 0.5rem;
  font-size: var(--t-xs);
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}
.foot-grid ul { margin: 0; padding: 0; list-style: none; line-height: 2; }
.foot-grid a { color: var(--ink); text-decoration: none; border-bottom: 1px dotted var(--line); }
.foot-grid a:hover { border-bottom-color: var(--prop); }

.colophon { margin-top: 2.5rem; max-width: 42rem; line-height: 1.8; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ---------- draft queue ---------- */

.queue-list {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--line);
}
.queue-list li {
  padding-block: 0.9rem;
  border-bottom: 1px solid var(--line);
  font-family: var(--data);
  font-size: var(--t-sm);
  line-height: 1.7;
}
.draft-title { color: var(--ink); }
.gloss { color: var(--muted); }

/* ---------- standing page ---------- */

.note-meta .status {
  display: block;
  color: var(--prop);
  letter-spacing: 0.06em;
  text-transform: lowercase;
}
