/* xtlsoft.top — paperback */

:root {
  --paper: #f5f4f0;
  --ink: #14130f;
  --ink-dim: #6d675a;
  --rule: #e0dcd0;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #121110;
    --ink: #e9e6dd;
    --ink-dim: #8d877a;
    --rule: #2a2822;
  }
}

* { margin: 0; padding: 0; box-sizing: border-box; }

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

body {
  background: var(--paper);
  color: var(--ink);
  font-family: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, "Times New Roman", serif;
  font-size: 1.08rem;
  line-height: 1.75;
  transition: background 0.3s ease, color 0.3s ease;
}

.page {
  max-width: 41rem;
  margin: 0 auto;
  padding: 20vh 1.75rem 4rem;
}

/* masthead */

.masthead { margin-bottom: 4.5rem; }

.sigil {
  display: block;
  fill: var(--ink);
  shape-rendering: crispEdges;
  margin-bottom: 2rem;
}

.name {
  font-size: 1.9rem;
  font-weight: 500;
  letter-spacing: 0.015em;
  line-height: 1.2;
}

.contact { margin-top: 0.5rem; }

.contact a {
  color: var(--ink-dim);
  text-decoration: none;
  font-size: 0.95rem;
  letter-spacing: 0.06em;
  transition: color 0.2s ease;
}

.contact a:hover { color: var(--ink); }

/* tabs — highlight only, switch on hover */

.tabs {
  display: flex;
  flex-wrap: wrap;
  column-gap: 0.4rem;
  row-gap: 0.35rem;
  padding: 0.9rem 0;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  margin-bottom: 2.6rem;
}

.tab {
  appearance: none;
  background: none;
  border: none;
  padding: 0.18rem 0.5rem;
  font: inherit;
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.13em;
  color: var(--ink-dim);
  cursor: pointer;
  transition: color 0.15s ease, background 0.15s ease;
}

.tab:hover,
.tab[aria-selected="true"] {
  background: var(--ink);
  color: var(--paper);
}

.tab:focus-visible {
  outline: 1px solid var(--ink);
  outline-offset: 2px;
}

/* panels */

.panel { min-height: 17rem; }

.panel p { max-width: 38rem; }

.panel p + p { margin-top: 1.2rem; }

.lede {
  font-size: 1.28rem;
  line-height: 1.55;
  border-left: 1px solid var(--ink);
  padding-left: 1.1rem;
  margin-bottom: 1.5rem;
}

.panel strong { font-weight: 600; }

.more { margin-top: 2.4rem; }

.more a {
  color: var(--ink);
  font-size: 0.95rem;
  letter-spacing: 0.04em;
  text-decoration: underline;
  text-underline-offset: 5px;
  text-decoration-thickness: 1px;
  text-decoration-color: var(--ink-dim);
  transition: text-decoration-color 0.2s ease;
}

.more a:hover { text-decoration-color: var(--ink); }

/* contact page */

.channels { margin-top: 1.5rem; }

.channel {
  color: var(--ink);
  font-size: 1.15rem;
  letter-spacing: 0.03em;
  line-height: 2.2;
  text-decoration: none;
  border-bottom: 1px solid var(--rule);
  transition: border-color 0.2s ease;
}

.channel:hover { border-bottom-color: var(--ink); }

/* contact form */

.form { margin-top: 2.2rem; }

.field { margin-bottom: 1.5rem; }

.field label {
  display: block;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.13em;
  color: var(--ink-dim);
  margin-bottom: 0.5rem;
}

.field input,
.field textarea {
  display: block;
  width: 100%;
  font: inherit;
  font-size: 1rem;
  color: var(--ink);
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--rule);
  padding: 0.35rem 0;
  border-radius: 0;
  transition: border-color 0.2s ease;
}

.field textarea {
  line-height: 1.6;
  resize: vertical;
  min-height: 8rem;
}

.field input:focus,
.field textarea:focus {
  outline: none;
  border-bottom-color: var(--ink);
}

.field input:focus-visible,
.field textarea:focus-visible {
  outline: 1px solid var(--ink);
  outline-offset: 3px;
}

.send {
  appearance: none;
  font: inherit;
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.13em;
  background: var(--ink);
  color: var(--paper);
  border: none;
  padding: 0.7rem 1.4rem;
  cursor: pointer;
  transition: opacity 0.2s ease;
}

.send:hover { opacity: 0.82; }

.send:focus-visible {
  outline: 1px solid var(--ink);
  outline-offset: 3px;
}

.form-note {
  margin-top: 1rem;
  font-size: 0.9rem;
  color: var(--ink-dim);
  min-height: 1.5rem;
}

.fallback {
  margin-top: 2.6rem;
  font-size: 0.95rem;
  color: var(--ink-dim);
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}

/* colophon */

.colophon {
  margin-top: 6rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--rule);
  display: flex;
  align-items: center;
  gap: 1.3rem;
}

.colophon a {
  color: var(--ink-dim);
  display: inline-flex;
  transition: color 0.2s ease;
}

.colophon a:hover { color: var(--ink); }

/* small screens */

@media (max-width: 36rem) {
  .page { padding-top: 13vh; }
  .name { font-size: 1.6rem; }
  .tab { font-size: 0.76rem; letter-spacing: 0.1em; }
}
