/*
 * Farm Towny Belgeleri (docs.farmtowny.com, 0.82.0): oyunun "Sade tahta" kitiyle aynı aile. Krem yüzeyler, ince
 * çizgiler, tek vurgu (yeşil), Nunito; başlıklar Fredoka. Üst şerit oyunun gece haritasının mavisi. Koyu temada
 * yüzeyler gece mavisine döner, krem yazıya geçer.
 */
@font-face {
  font-family: 'Nunito';
  font-weight: 400;
  font-display: swap;
  src: url('fonts/nunito-latin-ext-400-normal.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Nunito';
  font-weight: 400;
  font-display: swap;
  src: url('fonts/nunito-latin-400-normal.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Nunito';
  font-weight: 700;
  font-display: swap;
  src: url('fonts/nunito-latin-ext-700-normal.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Nunito';
  font-weight: 700;
  font-display: swap;
  src: url('fonts/nunito-latin-700-normal.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Nunito';
  font-weight: 800;
  font-display: swap;
  src: url('fonts/nunito-latin-ext-800-normal.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Nunito';
  font-weight: 800;
  font-display: swap;
  src: url('fonts/nunito-latin-800-normal.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Fredoka';
  font-weight: 600;
  font-display: swap;
  src: url('fonts/fredoka-latin-ext-600-normal.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Fredoka';
  font-weight: 600;
  font-display: swap;
  src: url('fonts/fredoka-latin-600-normal.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --bg: #f3ead4;
  --paper: #fff8e8;
  --card: #ffffff;
  --line: #dccfb0;
  --line-2: #eadfc4;
  --ink: #2f2416;
  --ink-2: #6f5f48;
  --acc: #2f8c3f;
  --acc-2: #256f32;
  --acc-ink: #ffffff;
  --acc-soft: #e3f0d9;
  --wheat: #e9b63a;
  --wheat-soft: #fbefcc;
  --night: #1d2b3a;
  --night-ink: #fff8e8;
  --top-bg: #fff8e8;
  --top-ink: #2f2416;
  --top-hover: rgba(47, 36, 22, 0.07);
  --shadow: 0 4px 14px rgba(40, 25, 5, 0.12);
  --r: 12px;
  --font: 'Nunito', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --display: 'Fredoka', 'Nunito', system-ui, sans-serif;
  --side: 272px;
  --top: 60px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #141e29;
    --paper: #1b2836;
    --card: #213244;
    --line: #34485e;
    --line-2: #2a3b4e;
    --ink: #f3ead4;
    --ink-2: #b8aa8f;
    --acc: #5cbf6c;
    --acc-2: #74d083;
    --acc-ink: #10210f;
    --acc-soft: #22392b;
    --wheat: #f0c454;
    --wheat-soft: #3a3322;
    --night: #0e161f;
    --night-ink: #f3ead4;
    --top-bg: #0e161f;
    --top-ink: #f3ead4;
    --top-hover: rgba(243, 234, 212, 0.1);
    --shadow: 0 4px 18px rgba(0, 0, 0, 0.35);
    color-scheme: dark;
  }
}

* {
  box-sizing: border-box;
}
html {
  scroll-padding-top: calc(var(--top) + 12px);
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 16.5px/1.65 var(--font);
  -webkit-text-size-adjust: 100%;
}
img {
  max-width: 100%;
  height: auto;
}
a {
  color: var(--acc-2);
  text-underline-offset: 2px;
}
a:hover {
  color: var(--acc);
}
:focus-visible {
  outline: 3px solid var(--wheat);
  outline-offset: 2px;
  border-radius: 6px;
}
h1,
h2,
h3 {
  font-family: var(--display);
  font-weight: 600;
  line-height: 1.2;
  text-wrap: balance;
  margin: 0;
}
.sr {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}
.skip {
  position: absolute;
  left: 12px;
  top: -48px;
  z-index: 20;
  background: var(--wheat);
  color: #2f2416;
  padding: 8px 14px;
  border-radius: 8px;
  font-weight: 800;
}
.skip:focus {
  top: 10px;
}

/* ------------------------------------------------------------ üst şerit */
.top {
  position: sticky;
  top: 0;
  z-index: 10;
  height: var(--top);
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 0 20px;
  background: var(--top-bg);
  color: var(--top-ink);
  border-bottom: 1px solid var(--line);
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: inherit;
  text-decoration: none;
  min-width: 0;
}
.brand img {
  height: 38px;
  width: auto;
  padding: 4px 10px;
  border-radius: 10px;
  background: #fff8e8;
}
.brand span {
  font: 600 18px/1 var(--display);
  padding: 5px 11px;
  border-radius: 999px;
  background: var(--acc-soft);
  color: var(--acc-2);
}
.top-links {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 6px;
}
.top-links a {
  color: var(--top-ink);
  text-decoration: none;
  font-weight: 700;
  font-size: 14.5px;
  padding: 7px 12px;
  border-radius: 999px;
}
.top-links a:hover {
  background: var(--top-hover);
  color: var(--top-ink);
}
.top-links a.play {
  background: var(--wheat);
  color: #2f2416;
}
.top-links a.play:hover {
  background: #f2c552;
  color: #2f2416;
}
.menu-btn {
  display: none;
  font: 800 14px/1 var(--font);
  color: var(--top-ink);
  background: var(--top-hover);
  border: 0;
  border-radius: 999px;
  padding: 9px 14px;
  cursor: pointer;
}

/* ------------------------------------------------------------ düzen */
.layout {
  display: grid;
  grid-template-columns: var(--side) minmax(0, 1fr);
  max-width: 1240px;
  margin: 0 auto;
  min-height: calc(100vh - var(--top));
}
main {
  min-width: 0;
  padding: 32px clamp(16px, 4vw, 56px) 64px;
}

/* ------------------------------------------------------------ kenar menüsü */
.side {
  position: sticky;
  top: var(--top);
  align-self: start;
  max-height: calc(100vh - var(--top));
  overflow-y: auto;
  padding: 20px 14px 28px 16px;
  border-right: 1px solid var(--line);
}
.find input {
  width: 100%;
  font: 600 15px/1.2 var(--font);
  color: var(--ink);
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 10px 14px;
}
.groups,
.groups ul {
  list-style: none;
  margin: 0;
  padding: 0;
}
.groups > .group {
  margin-top: 18px;
}
.group > span {
  display: block;
  font-size: 13px;
  font-weight: 800;
  color: var(--ink-2);
  letter-spacing: 0.02em;
  padding: 0 10px 6px;
}
.group a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 10px;
  border-radius: 10px;
  color: var(--ink);
  text-decoration: none;
  font-weight: 700;
  font-size: 15px;
  line-height: 1.3;
}
.group a img {
  width: 24px;
  height: 24px;
  flex: none;
}
.group a:hover {
  background: var(--paper);
  color: var(--ink);
}
.group a[aria-current='page'] {
  background: var(--acc);
  color: var(--acc-ink);
}
.group a[aria-current='page'] img {
  filter: drop-shadow(0 0 1px rgba(0, 0, 0, 0.4));
}
.side .none {
  color: var(--ink-2);
  padding: 8px 10px;
  margin: 0;
}

/* ------------------------------------------------------------ konu sayfası */
.doc,
.home {
  max-width: 780px;
}
.doc-head {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  margin-bottom: 22px;
}
.doc-head > img {
  width: 48px;
  height: 48px;
  flex: none;
  padding: 6px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--r);
}
.doc-head h1 {
  font-size: clamp(28px, 4vw, 36px);
}
.lead {
  font-size: 1.12em;
  color: var(--ink-2);
  margin: 8px 0 0;
  max-width: 62ch;
}
.doc section {
  margin-top: 34px;
}
.doc h2,
.home h2 {
  font-size: 23px;
  margin-bottom: 12px;
}
.doc h2 a {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: inherit;
  text-decoration: none;
}
.doc p,
.doc li {
  max-width: 68ch;
}

/* Adımlar: gerçekten sıralı; yeşil numaralar. */
.steps {
  list-style: none;
  counter-reset: step;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px;
}
.steps li {
  counter-increment: step;
  position: relative;
  padding: 12px 16px 12px 54px;
  background: var(--paper);
  border: 1px solid var(--line-2);
  border-radius: var(--r);
}
.steps li::before {
  content: counter(step);
  position: absolute;
  left: 14px;
  top: 12px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--acc);
  color: var(--acc-ink);
  font: 800 14px/28px var(--font);
  text-align: center;
  font-variant-numeric: tabular-nums;
}

/* İpuçları: buğday renginde sap işareti. */
.tips {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
}
.tips li {
  position: relative;
  padding-left: 26px;
}
.tips li::before {
  content: '';
  position: absolute;
  left: 4px;
  top: 0.62em;
  width: 10px;
  height: 10px;
  border-radius: 3px;
  background: var(--wheat);
  transform: rotate(45deg);
}

/* Ekran görüntüleri: oyunun kartı gibi çerçeve. */
.shot {
  margin: 26px 0;
}
.shot img {
  display: block;
  width: 100%;
  border-radius: var(--r);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  background: var(--night);
}
/* İmleç kartı gibi küçük kırpımlar büyütülmez. */
.shot.small img {
  width: auto;
  max-width: 100%;
}
.shot figcaption {
  font-size: 14.5px;
  color: var(--ink-2);
  margin-top: 8px;
  max-width: 68ch;
}

/* Tablolar: oyunun yardım tabloları gibi, kendi içinde kayar. */
.table {
  margin: 18px 0 0;
}
.table figcaption {
  font-weight: 800;
  margin-bottom: 8px;
}
.scroll {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: var(--card);
}
table {
  border-collapse: collapse;
  width: 100%;
  font-size: 14.5px;
  line-height: 1.4;
}
th,
td {
  text-align: left;
  padding: 9px 12px;
  border-bottom: 1px solid var(--line-2);
  vertical-align: top;
}
th {
  background: var(--paper);
  font-weight: 800;
  white-space: nowrap;
}
tbody tr:last-child td {
  border-bottom: 0;
}
td.num {
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

/* Sık sorulanlar. */
.faq {
  border: 1px solid var(--line-2);
  border-radius: var(--r);
  background: var(--paper);
  margin-top: 8px;
}
.faq summary {
  cursor: pointer;
  font-weight: 800;
  padding: 12px 16px;
  list-style: none;
  display: flex;
  gap: 10px;
  align-items: baseline;
}
.faq summary::-webkit-details-marker {
  display: none;
}
.faq summary::before {
  content: '+';
  color: var(--acc);
  font-weight: 800;
  width: 1ch;
  flex: none;
}
.faq[open] summary::before {
  content: '−';
}
.faq p {
  margin: 0;
  padding: 0 16px 14px 38px;
}

/* Önceki / sonraki. */
.pager {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 48px;
}
.pager a {
  display: block;
  padding: 12px 16px;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: var(--paper);
  text-decoration: none;
  color: var(--ink);
  font-weight: 800;
}
.pager a small {
  display: block;
  font-weight: 700;
  color: var(--ink-2);
  font-size: 13px;
}
.pager .next {
  text-align: right;
  grid-column: 2;
}
.pager a:hover {
  border-color: var(--acc);
}

/* ------------------------------------------------------------ ana sayfa */
.hero {
  display: grid;
  gap: 24px;
}
.hero h1 {
  font-size: clamp(34px, 5.4vw, 52px);
}
.hero-shot {
  margin: 0;
}
.hero-shot img {
  display: block;
  width: 100%;
  border-radius: calc(var(--r) + 4px);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}
.btn {
  display: inline-block;
  font-weight: 800;
  padding: 10px 18px;
  border-radius: 999px;
  background: var(--acc);
  color: var(--acc-ink);
  text-decoration: none;
  margin: 6px 6px 0 0;
}
.btn:hover {
  background: var(--acc-2);
  color: var(--acc-ink);
}
.btn.ghost {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--line);
}
.btn.ghost:hover {
  border-color: var(--acc);
  color: var(--ink);
}
.quick {
  margin-top: 40px;
}
.home > section:last-child {
  margin-top: 40px;
}
.sect h3 {
  font-size: 17px;
  margin: 26px 0 10px;
  color: var(--ink-2);
}
.cards {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 10px;
}
.card {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  height: 100%;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: var(--paper);
  text-decoration: none;
  color: var(--ink);
}
.card img {
  width: 32px;
  height: 32px;
  flex: none;
}
.card b {
  display: block;
  font-size: 16px;
}
.card small {
  display: block;
  color: var(--ink-2);
  font-size: 14px;
  line-height: 1.45;
  margin-top: 2px;
}
.card:hover {
  border-color: var(--acc);
  color: var(--ink);
}

.foot {
  border-top: 1px solid var(--line);
  color: var(--ink-2);
  font-size: 14px;
  text-align: center;
  padding: 18px 16px 28px;
}
.foot p {
  margin: 0;
}

/* ------------------------------------------------------------ dar ekran */
@media (max-width: 860px) {
  .layout {
    grid-template-columns: minmax(0, 1fr);
  }
  .menu-btn {
    display: inline-block;
  }
  .brand span {
    display: none;
  }
  .side {
    position: fixed;
    inset: var(--top) auto 0 0;
    width: min(320px, 86vw);
    max-height: none;
    z-index: 9;
    background: var(--bg);
    border-right: 1px solid var(--line);
    box-shadow: var(--shadow);
    transform: translateX(-105%);
  }
  /* Kayma yalnız menü düğmesiyle; pencere daralıp genişleyince menü kendiliğinden kaymaz. */
  body.menu-anim .side {
    transition: transform 0.2s ease;
  }
  body.menu-open .side {
    transform: none;
  }
  main {
    padding-top: 24px;
  }
  .top {
    padding: 0 12px;
    gap: 8px;
  }
  .top-links a:not(.play) {
    padding: 7px 8px;
  }
}
@media (max-width: 520px) {
  .doc-head > img {
    width: 40px;
    height: 40px;
  }
  .steps li {
    padding-left: 48px;
  }
  .pager {
    grid-template-columns: 1fr;
  }
  .pager .next {
    grid-column: 1;
  }
}
@media (prefers-reduced-motion: reduce) {
  body.menu-anim .side {
    transition: none;
  }
}
