@font-face {
  font-family: "MiriamLibre-Bold";
  src: url("../fonts/MiriamLibre-Bold.ttf") format("truetype");
  font-weight: bold;
  font-style: normal;
}

@font-face {
  font-family: "MiriamLibre-Regular";
  src: url("../fonts/MiriamLibre-Regular.ttf") format("truetype");
  font-weight: normal;
  font-style: normal;
}

@font-face {
  font-family: "MPlusCode-Expanded-Bold";
  src: url("../fonts/MPLUSCodeLatin_Expanded-Bold.ttf") format("truetype");
  font-weight: bold;
  font-style: normal;
}

@font-face {
  font-family: "MPlusCode-Expanded-Regular";
  src: url("../fonts/MPLUSCodeLatin_Expanded-Regular.ttf") format("truetype");
  font-weight: normal;
  font-style: normal;
}

:root {
  --bg: #f2ede4;
  --bg-warm: #e3d7c4;
  --surface: rgba(255, 250, 242, 0.82);
  --surface-strong: rgba(255, 253, 248, 0.94);
  --ink: #1d2a24;
  --muted: #58645e;
  --accent: #1f6b52;
  --accent-strong: #164837;
  --accent-soft: #dcece3;
  --border: rgba(29, 42, 36, 0.12);
  --shadow: 0 24px 60px rgba(23, 35, 30, 0.12);
}

html {
  min-height: 100%;
  scroll-behavior: smooth;
}

body.site-body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at top left, rgba(31, 107, 82, 0.18), transparent 34%),
    radial-gradient(circle at top right, rgba(146, 106, 48, 0.12), transparent 28%),
    linear-gradient(180deg, #f5f1e9 0%, #efe8dc 48%, #e8dfcf 100%);
  font-family: "MiriamLibre-Regular", serif;
}

a {
  color: var(--accent-strong);
  transition: color 0.2s ease, background-color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

a:hover {
  color: var(--accent);
}

p:last-child,
ul:last-child {
  margin-bottom: 0;
}

.site-shell {
  max-width: 1120px;
}

.site-header {
  padding-top: 1.25rem;
}

.site-nav {
  padding: 0.7rem 1rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 1.25rem;
  background: rgba(19, 49, 38, 0.92);
  box-shadow: 0 18px 44px rgba(12, 31, 24, 0.24);
}

.site-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.8rem;
  color: #fff;
  text-decoration: none;
  font-family: "MPlusCode-Expanded-Regular", monospace;
}

.site-brand:hover {
  color: #fff;
}

.site-brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.4rem;
  height: 2.4rem;
  border-radius: 0.85rem;
  background: linear-gradient(135deg, #66af8c 0%, #d4ebdf 100%);
  color: #123024;
  font-family: "MPlusCode-Expanded-Bold", monospace;
  font-size: 0.95rem;
}

.site-brand-text {
  letter-spacing: 0.05em;
}

.site-toggler {
  border-color: rgba(255, 255, 255, 0.18);
}

.site-nav-link {
  padding: 0.55rem 1rem !important;
  border-radius: 999px;
  color: rgba(255, 255, 255, 0.8);
  font-family: "MPlusCode-Expanded-Regular", monospace;
  font-size: 0.95rem;
}

.site-nav-link:hover,
.site-nav-link.is-active {
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
}

.page-shell {
  padding-top: 2rem;
  padding-bottom: 4rem;
}

.hero-panel,
.section-card,
.feature-card,
.tool-card,
.note-card,
.table-card,
.archive-panel,
.page-intro {
  border: 1px solid var(--border);
  border-radius: 1.75rem;
  background: var(--surface);
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
}

.hero-panel {
  position: relative;
  overflow: hidden;
  padding: clamp(1.75rem, 4vw, 4rem);
}

.hero-panel::after {
  content: "";
  position: absolute;
  right: -12%;
  bottom: -28%;
  width: min(34rem, 58vw);
  height: min(34rem, 58vw);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(31, 107, 82, 0.18) 0%, rgba(31, 107, 82, 0) 70%);
  pointer-events: none;
}

.hero-eyebrow,
.section-kicker,
.footer-title {
  margin-bottom: 0;
  color: var(--accent-strong);
  font-family: "MPlusCode-Expanded-Regular", monospace;
  font-size: 0.82rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.hero-panel h1,
.page-intro h1 {
  max-width: 11ch;
  margin: 0.8rem 0 1.25rem;
  font-family: "MiriamLibre-Bold", serif;
  font-size: clamp(2.4rem, 5vw, 4.8rem);
  line-height: 1.04;
}

.hero-panel p,
.page-intro p,
.card-copy,
.feature-card p,
.tool-card p,
.note-card p,
.section-card p {
  color: var(--muted);
  line-height: 1.75;
}

.hero-panel p {
  max-width: 38rem;
  font-size: 1.05rem;
}

.hero-actions,
.card-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  margin-top: 1.5rem;
}

.btn-accent,
.btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.8rem 1.2rem;
  border-radius: 999px;
  border: 1px solid transparent;
  font-family: "MPlusCode-Expanded-Regular", monospace;
  text-decoration: none;
}

.btn-accent {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.btn-accent:hover {
  background: var(--accent-strong);
  border-color: var(--accent-strong);
  color: #fff;
  transform: translateY(-1px);
}

.btn-ghost {
  border-color: rgba(29, 42, 36, 0.14);
  background: rgba(255, 255, 255, 0.48);
  color: var(--ink);
}

.btn-ghost:hover {
  border-color: rgba(29, 42, 36, 0.24);
  background: rgba(255, 255, 255, 0.78);
  color: var(--ink);
  transform: translateY(-1px);
}

.status-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

.status-strip span,
.badge-inline {
  display: inline-flex;
  align-items: center;
  padding: 0.45rem 0.8rem;
  border: 1px solid rgba(29, 42, 36, 0.1);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.52);
  color: var(--accent-strong);
  font-family: "MPlusCode-Expanded-Regular", monospace;
  font-size: 0.85rem;
}

.section-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 1.5rem;
  margin-top: 1.5rem;
}

.section-card,
.feature-card,
.tool-card,
.note-card,
.table-card,
.archive-panel,
.page-intro {
  padding: 1.5rem;
}

.section-card--wide {
  grid-column: span 7;
}

.section-card--narrow {
  grid-column: span 5;
}

.section-card--half {
  grid-column: span 6;
}

.card-title {
  margin: 0.65rem 0 0.9rem;
  font-family: "MiriamLibre-Bold", serif;
  font-size: clamp(1.5rem, 3vw, 2rem);
}

.clean-list {
  margin: 1rem 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.8rem;
}

.clean-list li {
  position: relative;
  padding-left: 1.2rem;
  color: var(--muted);
  line-height: 1.7;
}

.clean-list li::before {
  content: "";
  position: absolute;
  top: 0.78rem;
  left: 0;
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 50%;
  background: var(--accent);
}

.page-intro h1 {
  max-width: none;
}

.archive-logo-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100%;
  border-radius: 1.2rem;
  padding: 1.75rem;
  background: linear-gradient(135deg, #18372b 0%, #244b3b 100%);
}

.archive-logo {
  width: min(100%, 18rem);
  height: auto;
}

.tool-card label,
.tool-card legend {
  margin-bottom: 0.45rem;
  color: var(--ink);
  font-family: "MiriamLibre-Bold", serif;
}

.form-select,
.form-control,
.form-control-plaintext {
  border-color: rgba(29, 42, 36, 0.16);
  background: rgba(255, 255, 255, 0.72);
}

.form-control-plaintext {
  padding: 0.9rem 1rem;
  border-radius: 1rem;
}

.form-select:focus,
.form-control:focus,
.form-control-plaintext:focus {
  border-color: rgba(31, 107, 82, 0.38);
  box-shadow: 0 0 0 0.25rem rgba(31, 107, 82, 0.12);
}

.form-check {
  margin: 0;
  padding: 0.95rem 0 0.95rem 1.9rem;
  border-top: 1px solid rgba(29, 42, 36, 0.08);
}

.form-check:first-child {
  padding-top: 0;
  border-top: 0;
}

.form-check:last-child {
  padding-bottom: 0;
}

.form-check-label {
  color: var(--muted);
}

.form-check-input {
  margin-top: 0.3rem;
}

.form-check-input:checked {
  background-color: var(--accent);
  border-color: var(--accent);
}

.result-text {
  color: var(--ink);
  font-size: 1.08rem;
  line-height: 1.72;
  white-space: pre-line;
}

.result-subtle {
  color: var(--muted);
  font-size: 0.95rem;
}

.table-card .table-responsive {
  border-radius: 1.1rem;
  overflow: hidden;
}

.poker-table {
  margin-bottom: 0;
}

.poker-table thead th {
  border: 0;
  background: rgba(19, 49, 38, 0.94);
  color: #fff;
  font-family: "MPlusCode-Expanded-Regular", monospace;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.poker-table td,
.poker-table th {
  padding: 1rem 0.9rem;
  border-color: rgba(29, 42, 36, 0.08);
  vertical-align: middle;
}

.poker-table tbody tr:nth-child(odd) {
  background: rgba(255, 252, 247, 0.78);
}

.poker-table tbody tr:nth-child(even) {
  background: rgba(238, 232, 223, 0.62);
}

.rank-highlight {
  color: var(--ink);
  font-family: "MiriamLibre-Bold", serif;
}

.site-footer {
  padding-bottom: 2.5rem;
}

.footer-shell {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1.5rem;
  padding-top: 1.4rem;
  border-top: 1px solid rgba(29, 42, 36, 0.12);
}

.footer-copy {
  max-width: 36rem;
  margin-top: 0.45rem;
  color: var(--muted);
  line-height: 1.7;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem 1.2rem;
}

.footer-links a {
  text-decoration: none;
  font-family: "MPlusCode-Expanded-Regular", monospace;
  font-size: 0.92rem;
}

@media (max-width: 991.98px) {
  .section-card--wide,
  .section-card--narrow,
  .section-card--half {
    grid-column: 1 / -1;
  }

  .hero-panel h1 {
    max-width: none;
  }
}

@media (max-width: 767.98px) {
  html {
    font-size: 15px;
  }

  .site-header {
    padding-top: 0.75rem;
  }

  .site-nav {
    border-radius: 1rem;
  }

  .page-shell {
    padding-top: 1.25rem;
    padding-bottom: 3rem;
  }

  .hero-panel,
  .section-card,
  .feature-card,
  .tool-card,
  .note-card,
  .table-card,
  .archive-panel,
  .page-intro {
    padding: 1.2rem;
    border-radius: 1.25rem;
  }

  .hero-actions,
  .card-links {
    flex-direction: column;
    align-items: stretch;
  }

  .btn-accent,
  .btn-ghost {
    width: 100%;
  }

  .footer-shell {
    flex-direction: column;
    align-items: flex-start;
  }

  .poker-table td,
  .poker-table th {
    padding: 0.85rem 0.7rem;
  }
}
