/* Tersic: native CSS, local assets, no webfonts or remote resources. */
:root {
  color-scheme: light;
  --ink: #152b3e;
  --muted: #526371;
  --blue: #0892d0;
  --orange: #fd9f00;
  --line: #d7e0e5;
  --paper: #fafbf9;
  --surface: #ffffff;
}
.xo-page {
  max-width: none;
  margin: 0;
  padding: 0;
}
.xo-container {
  width: auto;
  padding-inline: 0;
  margin-inline: 0;
}
.shell,
.topbar-inner,
.footer-inner {
  margin-inline: auto;
}
.xo-smart-table-data {
  min-width: 480px;
}
.xo-smart-table-wrap {
  max-width: 100%;
  overflow-x: auto;
}
.xo-page:has(.hero) nav a[href="/"],
.xo-page:has(.counter-value) nav a[href="/components/"],
.xo-page:has(.storage-bar) nav a[href="/data/"] {
  background: #e8f3f8;
  color: #184b68;
}
html {
  min-width: 0;
  scroll-behavior: smooth;
}
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family:
    Inter,
    ui-sans-serif,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  font-size: 16px;
  line-height: 1.65;
}
*,
*::before,
*::after {
  box-sizing: border-box;
}
:where(section, article, aside, header, footer, div, form) {
  min-width: 0;
}
h1,
h2,
h3,
p {
  margin-top: 0;
}
h1,
h2,
h3 {
  color: var(--ink);
  line-height: 1.15;
  letter-spacing: -0.035em;
  font-weight: 650;
}
h1 {
  font-size: clamp(2.5rem, 5.5vw, 4.5rem);
  max-width: 15ch;
  margin-bottom: 1.25rem;
}
h2 {
  font-size: clamp(1.5rem, 2.8vw, 2.1rem);
  margin-bottom: 1rem;
}
h3 {
  font-size: 1.2rem;
  margin-bottom: 1rem;
}
p {
  margin-bottom: 1rem;
  overflow-wrap: anywhere;
}
a {
  color: #006694;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.23em;
  font-weight: 600;
}
a:hover {
  color: var(--ink);
}
:focus-visible {
  outline: 3px solid #006694;
  outline-offset: 4px;
}
button,
input,
select,
textarea {
  font: inherit;
}
button,
.primary-link,
.secondary-link {
  min-height: 46px;
  border-radius: 8px;
  font-weight: 650;
  padding: 0.7rem 1.1rem;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
}
button,
.primary-link {
  background: var(--ink);
  color: white;
}
button:hover,
.primary-link:hover {
  background: #24465d;
  color: white;
}
button.quiet,
.secondary-link {
  background: white;
  color: var(--ink);
  border-color: #bdcbd3;
}
button.quiet:hover,
.secondary-link:hover {
  background: #edf4f7;
}
button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
button {
  white-space: normal;
}
input:not([type="checkbox"]):not([type="radio"]),
textarea,
select {
  width: 100%;
  min-width: 0;
  min-height: 46px;
  border: 1px solid #96aab6;
  border-radius: 7px;
  padding: 0.6rem 0.75rem;
  background: white;
  color: var(--ink);
}
input[type="checkbox"],
input[type="radio"] {
  accent-color: #006694;
  width: 19px;
  height: 19px;
  flex-shrink: 0;
}
label {
  font-size: 0.9rem;
  font-weight: 600;
  color: #334b5d;
}
form {
  display: grid;
  gap: 1rem;
}
form button {
  justify-self: start;
}
form .xo-field {
  display: grid;
  gap: 0.35rem;
}
img {
  max-width: 100%;
  height: auto;
  display: block;
}
.topbar {
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}
.topbar-inner {
  max-width: 1160px;
  margin: auto;
  padding: 1.05rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}
.brand {
  color: var(--ink);
  font-size: 1.5rem;
  letter-spacing: -0.06em;
  font-weight: 800;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
}
.brand::before {
  content: "";
  width: 13px;
  height: 13px;
  border-radius: 4px;
  background: var(--blue);
  box-shadow: 5px -5px 0 -1px var(--orange);
}
nav {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
}
nav a {
  display: inline-flex;
  align-items: center;
  padding: 0.55rem 0.85rem;
  min-height: 44px;
  color: var(--muted);
  font-size: 0.92rem;
  text-decoration: none;
  border-radius: 7px;
}
nav a:hover {
  background: #eef5f8;
}
.shell {
  max-width: 1160px;
  margin: auto;
  padding: 0 2rem 5rem;
}
.xo-layout-main {
  padding: 0;
}
.hero {
  display: grid;
  grid-template-columns: 1.12fr 1fr;
  align-items: center;
  gap: 2.5rem;
  padding: 5.5rem 0 2rem;
}
.hero-lede {
  font-size: 1.15rem;
  color: var(--muted);
  max-width: 48ch;
}
.hero-art {
  width: 100%;
}
.eyebrow {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.13em;
  font-weight: 750;
  color: #426174;
  margin-bottom: 1.1rem;
}
.hero .eyebrow::before {
  content: "";
  display: inline-block;
  width: 7px;
  height: 7px;
  background: var(--orange);
  border-radius: 50%;
  margin-right: 0.6rem;
}
.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  align-items: center;
  margin: 1.5rem 0;
}
.hero-note {
  color: var(--muted);
  font-size: 0.78rem;
  margin: 1.5rem 0 0;
}
.section-space {
  margin-top: 3.5rem;
}
.xo-grid {
  gap: 1.25rem;
}
.feature {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  padding: 1.65rem;
  display: flex;
  flex-direction: column;
}
.feature-number {
  color: #547185;
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 0.75rem;
  margin-bottom: 1.75rem;
}
.feature h2 {
  font-size: 1.45rem;
  max-width: 16ch;
}
.feature p:not(.feature-number) {
  color: var(--muted);
  font-size: 0.95rem;
}
.feature a {
  margin-top: auto;
  padding-top: 0.5rem;
  font-size: 0.9rem;
}
.source-example {
  min-width: 0;
}
.source-example h3 {
  font-size: 0.9rem;
  letter-spacing: 0;
  margin-top: 1.1rem;
}
.codeblock {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 0.8rem;
  line-height: 1.75;
  background: #edf2f4;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 1.25rem;
  color: #25455c;
  margin-bottom: 0;
}
.note {
  padding: 1.75rem;
  border-left: 3px solid var(--blue);
  background: #eef6f8;
  border-radius: 0 10px 10px 0;
  margin: 3.5rem 0 0;
}
.note h2 {
  font-size: 1.2rem;
  letter-spacing: -0.02em;
}
.note p:last-child {
  margin-bottom: 0;
}
.section-summary {
  max-width: 76ch;
  color: var(--muted);
  margin-bottom: 1.75rem;
}
.intro {
  padding: 4rem 0 1.5rem;
}
.intro h1 {
  max-width: 19ch;
  font-size: clamp(2.5rem, 5vw, 3.5rem);
}
.lede {
  font-size: 1.12rem;
  color: var(--muted);
  max-width: 67ch;
}
.split-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}
.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 1.75rem;
}
.panel > p {
  color: var(--muted);
}
.panel > h2 {
  font-size: 1.45rem;
}
.counter-value {
  display: block;
  font-size: 4rem;
  line-height: 1.2;
  font-weight: 650;
  letter-spacing: -0.06em;
  margin: 1rem 0;
}
.task-count {
  font-size: 2rem;
  display: block;
  font-weight: 650;
  line-height: 1.3;
}
.storage-status {
  display: inline-block;
  background: #e8f3f8;
  color: #21516d;
  padding: 0.2rem 0.65rem;
  border-radius: 5px;
  font-size: 0.85rem;
  font-family: ui-monospace, monospace;
  margin-bottom: 0.5rem;
}
.panel .storage-status {
  display: block;
  width: fit-content;
}
.panel > a {
  display: inline-block;
  margin-top: 0.75rem;
}
output {
  overflow-wrap: anywhere;
}
.preview-title {
  display: block;
  font-size: 1.7rem;
  font-weight: 650;
  min-height: 2.5rem;
  margin-bottom: 1.5rem;
}
.preview-tone,
.preview-number {
  display: block;
  margin-bottom: 1rem;
}
.badge {
  background: #eaf2ed;
  color: #265c3d;
  border-radius: 6px;
  padding: 0.3rem 0.6rem;
  display: inline-block;
}
.muted {
  color: var(--muted);
  font-size: 0.85rem;
}
.feedback-error,
.preview-error {
  display: block;
  color: #9a2b18;
  margin-top: 1rem;
}
.feedback-success,
.preview-success {
  display: block;
  color: #245e3c;
  margin-top: 0.5rem;
}
.privacy-note {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 1.1rem 1.4rem;
  background: #f1f5f4;
  color: #3b5666;
  font-size: 0.9rem;
}
.privacy-note p {
  margin: 0;
}
.storage-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.5rem 0;
  gap: 1rem;
  border-bottom: 1px solid var(--line);
}
.storage-bar p {
  margin: 0 0 0.4rem;
  font-size: 0.8rem;
}
.warning {
  color: #7c3c06;
  background: #fff3df;
  padding: 1rem 1.3rem;
  border-radius: 8px;
  margin-top: 1rem;
}
.reset-panel {
  border-top: 3px solid var(--orange);
}
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
  background: white;
}
caption {
  text-align: left;
  font-weight: 650;
  padding: 0.8rem;
  color: var(--ink);
}
th,
td {
  padding: 0.85rem 0.8rem;
  border-bottom: 1px solid var(--line);
  text-align: left;
  overflow-wrap: anywhere;
}
th {
  background: #f0f4f6;
}
.xo-table {
  max-width: 100%;
  overflow-x: auto;
}
/* Stable generated hooks keep the table's own scrolling local. */
.xo-smart-table {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 1.25rem;
  background: white;
  min-width: 0;
}
.xo-smart-table input,
.xo-smart-table select {
  max-width: 100%;
}
.xo-smart-table button {
  font-size: 0.85rem;
  padding: 0.45rem 0.75rem;
}
.xo-smart-table th button {
  background: transparent;
  color: var(--ink);
  border-color: transparent;
  padding: 0.3rem 0;
}
.footer {
  border-top: 1px solid var(--line);
  background: white;
}
.footer-inner {
  max-width: 1160px;
  margin: auto;
  padding: 2rem;
  display: flex;
  justify-content: space-between;
  gap: 2rem;
  color: var(--muted);
  font-size: 0.78rem;
}
.footer-inner p {
  margin: 0;
}
.footer-brand {
  color: var(--ink);
  font-weight: 650;
}
.footer-copyright {
  display: block;
  font-size: 0.72rem;
}
.footer-project a {
  color: inherit;
  font-weight: inherit;
}
@media (max-width: 63.99rem) {
  .hero {
    gap: 1rem;
    padding-top: 4rem;
  }
}
@media (max-width: 39.99rem) {
  .topbar-inner {
    padding: 1rem 1.25rem 0.7rem;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.6rem;
  }
  nav {
    width: 100%;
    justify-content: space-between;
    gap: 0;
  }
  nav a {
    padding: 0.55rem 0.65rem;
    font-size: 0.85rem;
  }
  .shell {
    padding: 0 1.25rem 3rem;
  }
  .hero {
    grid-template-columns: 1fr;
    padding-top: 2.75rem;
    gap: 1.25rem;
  }
  .hero h1 {
    max-width: 13ch;
  }
  .hero-art {
    max-width: 430px;
    margin: auto;
  }
  .hero-lede {
    font-size: 1.05rem;
  }
  .hero-note {
    font-size: 0.72rem;
  }
  .section-space {
    margin-top: 2.5rem;
  }
  .split-grid {
    grid-template-columns: 1fr;
  }
  .intro {
    padding-top: 2.75rem;
  }
  .panel,
  .feature {
    padding: 1.35rem;
  }
  .feature h2 {
    max-width: none;
  }
  .feature-number {
    margin-bottom: 1rem;
  }
  .footer-inner {
    padding: 1.5rem 1.25rem;
    flex-direction: column;
    gap: 0.5rem;
  }
  .xo-smart-table {
    padding: 0.8rem;
  }
  .note {
    padding: 1.25rem;
  }
}
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}

/* Tersic's philosophy shares the existing page shell. */
.meaning { max-width: 76ch; margin-inline: auto; padding-block: 3.5rem; }
.meaning h1 { max-width: 20ch; font-size: clamp(2.25rem, 5vw, 3.75rem); }
.meaning p, .principles { margin-bottom: 1.5rem; }
.principles { padding-left: 1.4rem; }
.principles li { padding-left: .35rem; margin-bottom: .9rem; }
.meaning-motto { font-size: 1.25rem; margin-top: 2rem; }
.xo-page:has(.meaning) nav a[href="/why-tersic/"] { background: #e8f3f8; color: #184b68; }
@media (max-width: 640px) { .meaning { padding-block: 2rem; } }
