:root {
  --ink: #14221f;
  --ink-soft: #3d524c;
  --paper: #f3ead8;
  --paper-2: #efe3cc;
  --card: #fffaf1;
  --line: rgba(20, 34, 31, 0.12);
  --teal: #1b7a6e;
  --teal-dark: #125951;
  --gold: #c9a227;
  --clay: #c45c26;
  --shadow: 0 18px 40px rgba(20, 34, 31, 0.12);
  --radius: 22px;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  font-family: Outfit, system-ui, sans-serif;
  color: var(--ink);
  background:
    radial-gradient(1200px 500px at 10% -10%, #f7d9a8 0%, transparent 55%),
    radial-gradient(900px 400px at 100% 0%, #b7ddd4 0%, transparent 50%),
    var(--paper);
}

.skip {
  position: absolute;
  left: -999px;
  top: 8px;
  background: var(--teal);
  color: #fff;
  padding: 8px 14px;
  border-radius: 999px;
  z-index: 20;
}

.skip:focus {
  left: 16px;
}

.paper-grain {
  pointer-events: none;
  position: fixed;
  inset: 0;
  opacity: 0.06;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)' opacity='.45'/%3E%3C/svg%3E");
  z-index: 0;
}

.site-header,
#app,
.site-footer {
  position: relative;
}

.site-header {
  z-index: 40;
}

#app,
.site-footer {
  z-index: 1;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1120px;
  margin: 0 auto;
  padding: 22px 24px 8px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: inherit;
}

.brand-name {
  font-family: Fraunces, Georgia, serif;
  font-weight: 700;
  font-size: 1.45rem;
  letter-spacing: -0.03em;
}

.nav {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
}

.nav a,
.nav-link {
  color: var(--ink-soft);
  text-decoration: none;
  font-weight: 500;
  background: none;
  border: 0;
  font: inherit;
  cursor: pointer;
  padding: 0;
}

.nav a:hover,
.nav-link:hover {
  color: var(--teal-dark);
}

.nav-item {
  position: relative;
}

.mega {
  position: absolute;
  right: 0;
  top: calc(100% + 12px);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: var(--shadow);
  padding: 18px;
  display: grid;
  grid-template-columns: repeat(4, minmax(150px, 1fr));
  gap: 16px 22px;
  width: min(920px, calc(100vw - 32px));
  max-height: min(70vh, 520px);
  overflow: auto;
  z-index: 50;
}

.mega[hidden] {
  display: none;
}

.mega h4 {
  margin: 0 0 8px;
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.mega a {
  display: block;
  font-size: 0.9rem;
  margin: 4px 0;
}

.lang-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 12px);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: var(--shadow);
  padding: 8px;
  min-width: 190px;
  z-index: 50;
  display: grid;
}

.lang-menu[hidden] {
  display: none;
}

.lang-menu button {
  text-align: start;
  background: transparent;
  border: 0;
  border-radius: 10px;
  padding: 8px 12px;
  font: inherit;
  cursor: pointer;
  color: var(--ink);
}

.lang-menu button:hover,
.lang-menu button[aria-current="true"] {
  background: #e7f3ef;
}

.lang-menu button[aria-current="true"] {
  font-weight: 700;
}

.hero {
  max-width: 1120px;
  margin: 8px auto 36px;
  padding: 8px 24px 12px;
  display: block;
}

.hero-copy {
  text-align: center;
}

.hero-kicker {
  display: inline-block;
  margin: 0 0 12px;
  padding: 5px 11px;
  font-size: 0.78rem;
  font-weight: 650;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--teal-dark);
  background: #e7f3ef;
  border: 1.5px solid #1b3d38;
  border-radius: 999px;
}

.hero h1 {
  font-family: Fraunces, Georgia, serif;
  font-size: clamp(2.5rem, 5.4vw, 4.25rem);
  line-height: 1.02;
  margin: 0 0 14px;
  letter-spacing: -0.045em;
}

.hero p.lede {
  font-size: 1.14rem;
  color: var(--ink-soft);
  max-width: none;
  margin: 0 0 18px;
}

.rating-row {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px 14px;
  margin: 0 0 16px;
}

.tool-page .rating-row {
  justify-content: flex-start;
  margin: 4px 0 14px;
}

.stars {
  display: flex;
  gap: 2px;
}

.star {
  border: 0;
  background: none;
  padding: 0 1px;
  font-size: 1.35rem;
  line-height: 1;
  color: #d7c4a0;
  cursor: pointer;
}

.star.is-on {
  color: var(--gold);
}

.rating-label {
  margin: 0;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--ink-soft);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin: 0 0 16px;
}

.hero-actions .btn {
  text-decoration: none;
}

.hero-visual {
  display: flex;
  flex-direction: column;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 18px 18px 20px;
  box-shadow: var(--shadow);
  min-height: 0;
}

.hero-art {
  display: grid;
  place-items: center;
  background: #eef3f8;
  border-radius: 16px;
  margin-bottom: 14px;
  min-height: 220px;
}

.hero-papers {
  width: min(100%, 360px);
  height: auto;
}

.hero-card {
  margin: 0;
  max-width: none;
  transform: none;
  border: 0;
  background: transparent;
  color: var(--ink);
  border-radius: 0;
  padding: 0;
  min-height: 0;
  box-shadow: none;
}

.search {
  display: flex;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 10px 14px;
  box-shadow: var(--shadow);
  max-width: none;
}

.search input {
  border: 0;
  outline: 0;
  background: transparent;
  width: 100%;
  font: inherit;
  padding: 6px 8px;
}

.hero-card h2 {
  font-family: Fraunces, Georgia, serif;
  margin: 0 0 8px;
}

.hero-card p {
  margin: 0;
  color: var(--ink-soft);
}

.section {
  max-width: 1120px;
  margin: 0 auto 42px;
  padding: 0 24px;
}

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 14px;
}

.section h2 {
  font-family: Fraunces, Georgia, serif;
  font-size: 1.5rem;
  margin: 0;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
  align-items: stretch;
}

.tool-card {
  background: #fff;
  border: 1px solid #eee8dc;
  border-radius: 16px;
  padding: 22px 20px 20px;
  text-decoration: none;
  color: inherit;
  box-shadow: none;
  transition: box-shadow 0.15s ease;
  min-height: 176px;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.tool-card:hover {
  box-shadow: 0 10px 24px rgba(20, 34, 31, 0.08);
}

.tool-card .icon {
  width: 48px;
  height: 48px;
  border-radius: 0;
  display: grid;
  place-items: center;
  background: transparent;
  color: inherit;
  font-weight: 700;
  margin-bottom: 14px;
  border: 0;
  box-shadow: none;
  flex: 0 0 48px;
  transform: none;
}

.tool-card:nth-child(n) .icon {
  background: transparent;
  transform: none;
}

.tool-glyph,
.ink-icon {
  display: block;
  width: 48px;
  height: 48px;
  overflow: visible;
}

.tool-card h3 {
  margin: 0 0 6px;
  font-size: 1.05rem;
}

.tool-card p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.92rem;
  line-height: 1.35;
}

.tool-page {
  max-width: 760px;
  margin: 10px auto 60px;
  padding: 0 24px;
}

.back {
  color: var(--teal-dark);
  text-decoration: none;
  font-weight: 600;
}

.tool-page h1 {
  font-family: Fraunces, Georgia, serif;
  font-size: 2.3rem;
  margin: 10px 0 8px;
}

.faq {
  max-width: 1120px;
  margin: 0 auto 48px;
  padding: 0 24px;
}

.tool-page .faq {
  max-width: none;
  margin: 28px 0 0;
  padding: 0;
}

.faq h2 {
  font-family: Fraunces, Georgia, serif;
  font-size: 1.6rem;
  margin: 0 0 16px;
}

.faq h3 {
  font-size: 1.05rem;
  margin: 18px 0 6px;
}

.faq p,
.aeo-block p,
.aeo-block li {
  color: var(--ink-soft);
  line-height: 1.5;
}

.aeo-block {
  margin-top: 28px;
}

.aeo-answer {
  color: var(--ink) !important;
  font-size: 1.05rem;
}

.dropzone {
  margin-top: 18px;
  border: 2px dashed #9bb8b0;
  background: rgba(255, 255, 255, 0.85);
  border-radius: 28px;
  padding: 42px 20px;
  text-align: center;
  cursor: pointer;
}

.dropzone.drag {
  border-color: var(--teal);
  background: #e7f3ef;
}

.file-list {
  margin: 16px 0;
  display: grid;
  gap: 8px;
}

.file-chip {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 10px 12px;
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.options {
  display: grid;
  gap: 12px;
  margin: 16px 0;
}

.options label {
  display: grid;
  gap: 6px;
  font-weight: 600;
  font-size: 0.92rem;
}

.options input,
.options select {
  font: inherit;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--card);
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 8px;
}

button,
.btn {
  font: inherit;
  border: 0;
  cursor: pointer;
  border-radius: 999px;
  padding: 12px 18px;
  font-weight: 600;
}

.btn-primary {
  background: var(--teal);
  color: white;
}

.btn-primary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn-ghost {
  background: transparent;
  border: 1px solid var(--line);
}

.status {
  margin-top: 16px;
  min-height: 1.4em;
  color: var(--ink-soft);
}

.error {
  color: var(--clay);
}

.site-footer {
  margin: 48px 0 0;
  padding: 0;
  max-width: none;
  background: #0f2f2c;
  color: #e8dcc4;
}

.footer-inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: 36px 24px 28px;
}

.footer-brand {
  font-family: Fraunces, Georgia, serif;
  font-size: 1.35rem;
  color: #f6efe3;
  text-decoration: none;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 28px;
  margin: 18px 0 16px;
}

.footer-links a {
  color: #d7cbb6;
  text-decoration: none;
  font-weight: 500;
}

.footer-links a:hover {
  color: #e9c46a;
}

.footer-copy {
  margin: 0;
  font-size: 0.85rem;
  color: #b7a98f;
}

.band-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
}

.band-grid a {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 18px;
  text-decoration: none;
  color: inherit;
}

.band-grid h3 {
  font-family: Fraunces, Georgia, serif;
  margin: 0 0 6px;
}

.crumb {
  color: var(--teal-dark);
  font-weight: 600;
  margin: 8px 0 0;
}

.options textarea {
  font: inherit;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--card);
  width: 100%;
}

[dir="rtl"] .mega {
  right: auto;
  left: 0;
}

.legal-page,
.blog-list {
  max-width: 760px;
  margin: 10px auto 60px;
  padding: 0 24px;
}

.blog-list {
  max-width: 980px;
}

.legal-page h1,
.blog-list h1 {
  font-family: Fraunces, Georgia, serif;
  font-size: 2.4rem;
  margin: 6px 0 8px;
  letter-spacing: -0.03em;
}

.kicker {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--teal-dark);
  margin: 12px 0 0;
}

.meta {
  color: var(--ink-soft);
  font-size: 0.92rem;
}

.legal-body h2 {
  font-family: Fraunces, Georgia, serif;
  font-size: 1.35rem;
  margin: 28px 0 8px;
}

.legal-body p,
.legal-body li {
  line-height: 1.65;
  color: var(--ink);
}

.legal-body a {
  color: var(--teal-dark);
}

.contact-form {
  display: grid;
  gap: 14px;
  margin-top: 22px;
}

.contact-form label {
  display: grid;
  gap: 6px;
  font-weight: 600;
}

.contact-form input,
.contact-form select,
.contact-form textarea {
  font: inherit;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--card);
}

.blog-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-top: 22px;
  align-items: stretch;
}

.blog-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 0 0 16px;
  text-decoration: none;
  color: inherit;
  display: grid;
  gap: 8px;
  overflow: hidden;
}

.blog-card-img,
.post-hero {
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: contain;
  object-position: center;
  display: block;
  background: #eef1f6;
  border-bottom: 0;
}

.post-hero {
  border-radius: 18px;
  margin: 12px 0 8px;
}

.blog-card time,
.blog-card h2,
.blog-card p,
.blog-card span {
  padding: 0 16px;
}

.blog-card time {
  padding-top: 12px;
  color: var(--teal-dark);
  font-size: 0.88rem;
  font-weight: 600;
}

.blog-card span {
  color: var(--teal-dark);
  font-size: 0.88rem;
  font-weight: 600;
}

.blog-card h2 {
  font-family: Fraunces, Georgia, serif;
  font-size: 1.35rem;
  margin: 0;
}

.blog-card p {
  margin: 0;
  color: var(--ink-soft);
  line-height: 1.45;
}

.blog-list .lede {
  color: var(--ink-soft);
  max-width: 40rem;
}

@media (max-width: 980px) {
  .grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .blog-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 800px) {
  .mega {
    grid-template-columns: repeat(2, 1fr);
    width: min(92vw, 420px);
    max-height: 70vh;
    overflow: auto;
  }
}

@media (max-width: 560px) {
  .grid,
  .blog-grid {
    grid-template-columns: 1fr;
  }
}
