/* lucianmesaros.ro — one stylesheet, no dependencies, no webfonts.
   Long-form reading is the whole job of this site. */

:root {
  --bg:        #fbfbf9;
  --surface:   #ffffff;
  --text:      #1c1c1a;
  --muted:     #5f5f58;
  --rule:      #e2e1db;
  --link:      #1a4f8a;
  --accent:    #8a5a1a;
  --own:       #1f7a3d;
  --not-own:   #6b6b64;
  --measure:   36rem;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg:      #131311;
    --surface: #1b1b18;
    --text:    #e8e7e1;
    --muted:   #a3a29a;
    --rule:    #33322d;
    --link:    #8fbcea;
    --accent:  #d8a55f;
    --own:     #6fd08c;
    --not-own: #9a9a92;
  }
}

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 1.0625rem/1.65 ui-serif, Georgia, "Iowan Old Style", "Times New Roman", serif;
  text-rendering: optimizeLegibility;
}

.skip {
  position: absolute; left: -9999px;
}
.skip:focus {
  left: 1rem; top: 1rem; z-index: 10;
  background: var(--surface); color: var(--text);
  padding: .5rem .75rem; border: 1px solid var(--rule);
}

/* ---------- chrome ---------- */

header.site, footer.site, main {
  max-width: var(--measure);
  margin-inline: auto;
  padding-inline: 1.25rem;
}

header.site {
  display: flex; flex-wrap: wrap; align-items: baseline;
  gap: .5rem 1.25rem;
  padding-block: 1.75rem 1.25rem;
  border-bottom: 1px solid var(--rule);
  margin-bottom: 2.5rem;
}

.wordmark {
  font-weight: 600; font-size: 1.05rem; letter-spacing: .01em;
  color: var(--text); text-decoration: none;
  margin-right: auto;
}

header.site nav {
  display: flex; flex-wrap: wrap; gap: .25rem 1rem;
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: .8125rem;
}
header.site nav a { color: var(--muted); text-decoration: none; }
header.site nav a:hover { color: var(--link); text-decoration: underline; }

footer.site {
  margin-top: 4rem;
  padding-block: 1.5rem 3rem;
  border-top: 1px solid var(--rule);
  color: var(--muted);
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: .8125rem; line-height: 1.6;
}
footer.site p { margin: 0 0 .75rem; }
footer.site .meta { color: var(--muted); }

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

h1, h2, h3 {
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  line-height: 1.25; letter-spacing: -.01em;
}
h1 { font-size: 1.9rem; margin: 0 0 1.25rem; font-weight: 650; }
h2 { font-size: 1.2rem; margin: 2.5rem 0 .75rem; font-weight: 650; }
h3 { font-size: 1rem;   margin: 1.75rem 0 .5rem;  font-weight: 650; }

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

a { color: var(--link); text-underline-offset: .13em; }

strong { font-weight: 650; }

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

blockquote {
  margin: 1.5rem 0; padding-left: 1rem;
  border-left: 2px solid var(--rule); color: var(--muted);
}

code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: .875em;
}

/* ---------- tables ---------- */

.tablewrap { overflow-x: auto; margin: 1.5rem 0; }

table {
  border-collapse: collapse; width: 100%;
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: .875rem;
}
th, td {
  text-align: left; padding: .5rem .6rem;
  border-bottom: 1px solid var(--rule);
  vertical-align: top;
}
th {
  font-weight: 600; color: var(--muted);
  font-size: .75rem; text-transform: uppercase; letter-spacing: .04em;
  white-space: nowrap;
}
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
tbody tr:last-child td { border-bottom: 0; }

/* Column alignment from markdown tables. build.py rewrites the extension's
   inline style attributes to these, so the CSP can forbid inline styles. */
.ta-r { text-align: right; font-variant-numeric: tabular-nums; }
.ta-l { text-align: left; }
.ta-c { text-align: center; }

/* ---------- the valuation top strip ---------- */

.strip {
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: 6px;
  padding: 1.25rem 1.25rem 1rem;
  margin: 0 0 2rem;
}
.strip .company {
  font-family: ui-sans-serif, system-ui, -apple-system, sans-serif;
  font-size: .75rem; text-transform: uppercase; letter-spacing: .06em;
  color: var(--muted); margin: 0 0 .5rem;
}
.strip .estimate {
  font-family: ui-sans-serif, system-ui, -apple-system, sans-serif;
  font-size: 1.5rem; font-weight: 650; line-height: 1.2;
  margin: 0 0 .35rem; font-variant-numeric: tabular-nums;
}
.strip .price {
  font-family: ui-sans-serif, system-ui, -apple-system, sans-serif;
  font-size: .875rem; color: var(--muted); margin: 0 0 1rem;
  font-variant-numeric: tabular-nums;
}
.strip .diff { color: var(--accent); font-weight: 600; }

.position {
  font-family: ui-sans-serif, system-ui, -apple-system, sans-serif;
  font-size: .875rem; font-weight: 600;
  margin: 0; padding-top: .9rem;
  border-top: 1px solid var(--rule);
}
.position .asat { display: block; font-weight: 400; font-size: .8125rem; color: var(--muted); margin-top: .2rem; }
.position.owned      { color: var(--own); }
.position.not-owned  { color: var(--not-own); }

/* ---------- disclosure block ---------- */

.disclosure {
  margin-top: 3rem; padding-top: 1.5rem;
  border-top: 1px solid var(--rule);
  font-size: .9375rem;
}
.disclosure h2 { font-size: 1rem; margin-top: 0; }
.disclosure p { margin-bottom: .8rem; color: var(--muted); }
.disclosure strong { color: var(--text); }

/* ---------- video ---------- */

.video {
  position: relative; width: 100%; aspect-ratio: 16 / 9;
  margin: 2rem 0; background: var(--surface);
  border: 1px solid var(--rule); border-radius: 6px; overflow: hidden;
}
.video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* ---------- misc ---------- */

.lede { font-size: 1.15rem; color: var(--muted); margin-bottom: 2rem; }
.empty { color: var(--muted); font-style: italic; }
.updated {
  font-family: ui-sans-serif, system-ui, -apple-system, sans-serif;
  font-size: .8125rem; color: var(--muted); margin-bottom: 2rem;
}

@media (max-width: 30rem) {
  body { font-size: 1rem; }
  h1 { font-size: 1.6rem; }
  header.site { padding-block: 1.25rem 1rem; margin-bottom: 2rem; }
}
