/* TheOak / 导航 — bright, happy, a little childish.
   One static page. No JS, no animation, no interaction beyond links. */

@font-face {
  font-family: "Da Xiang Sans";
  src: url("../assets/fonts/daxiang-sans.woff2?v=7") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "KuaiLe";
  src: url("../assets/fonts/zcool-kuaile.woff2?v=5") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Oak";
  src: url("../assets/fonts/fraunces-oak.woff2?v=1") format("woff2");
  font-weight: 600;
  font-style: italic;
  font-display: swap;
}

@font-face {
  font-family: "Plex Mono";
  src: url("../assets/fonts/plex-mono-400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Plex Mono";
  src: url("../assets/fonts/plex-mono-500.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

:root {
  --paper: #fff8e9;
  --ink: #26203b;
  --muted: #736c86;
  --line: rgba(38, 32, 59, 0.18);
  --coral: #ff6b4a;
  --yellow: #ffc93c;
  --mint: #6fd8b0;
  --sky: #7bc8ff;
  --lavender: #b49cff;
  --pink: #ff9fc0;
  --blue: #2f6bff;
  --white: #fffdf8;
  --brand: "Oak", "KuaiLe", Georgia, serif;
  --fun: "KuaiLe", "Da Xiang Sans", "PingFang SC", "Microsoft YaHei", sans-serif;
  --sans: "Da Xiang Sans", "Noto Sans SC", "Helvetica Neue", Arial,
    "PingFang SC", "Microsoft YaHei", sans-serif;
  --mono: "Plex Mono", "Da Xiang Sans", "SFMono-Regular", Consolas,
    "Liberation Mono", monospace;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  min-height: 100vh;
  padding: 20px 0;
  background-color: #bfe8ff;
  background-image: radial-gradient(circle at 8% 10%, #ffe083 0 80px, transparent 82px),
    radial-gradient(circle at 92% 88%, #ffc1d8 0 120px, transparent 122px),
    radial-gradient(circle at 90% 8%, #cff5de 0 60px, transparent 62px),
    radial-gradient(rgba(255, 255, 255, 0.55) 1.4px, transparent 1.5px);
  background-size: auto, auto, auto, 24px 24px;
  background-attachment: fixed;
  color: var(--ink);
  font-family: var(--sans);
  font-size: 15px;
  font-weight: 400;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

::selection {
  background: var(--yellow);
  color: var(--ink);
}

a {
  color: inherit;
  text-decoration: none;
}

h1,
h2,
p,
ol {
  margin: 0;
  padding: 0;
}

ol {
  list-style: none;
}

:focus-visible {
  outline: 2px solid var(--coral);
  outline-offset: 3px;
}

/* ---------- the sheet ---------------------------------------------------- */

.sheet {
  position: relative;
  display: flex;
  flex-direction: column;
  width: calc(100% - 40px);
  max-width: 1440px;
  min-height: calc(100vh - 40px);
  margin: 0 auto;
  background: var(--paper);
  border: 3px solid var(--ink);
  border-radius: 30px;
  box-shadow: 10px 10px 0 var(--ink);
  overflow: hidden;
}

.sheet::before {
  content: "";
  flex: none;
  height: 10px;
  background: linear-gradient(
    90deg,
    #ff6b4a 0 14.28%,
    #ffc93c 14.28% 28.56%,
    #6fd8b0 28.56% 42.84%,
    #7bc8ff 42.84% 57.12%,
    #b49cff 57.12% 71.4%,
    #ff9fc0 71.4% 85.68%,
    #ff6b4a 85.68% 100%
  );
}

/* ---------- top bar ------------------------------------------------------ */

.bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 14px clamp(18px, 3vw, 32px);
  border-bottom: 2px solid var(--ink);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  line-height: 1;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  flex: none;
}

.brand-mark svg {
  display: block;
  width: 100%;
  height: 100%;
}

.brand-name {
  font-family: var(--brand);
  font-size: 32px;
  font-weight: 600;
  font-style: italic;
  line-height: 1;
  letter-spacing: -0.015em;
}

.bar-title {
  padding: 6px 12px;
  background: var(--yellow);
  border: 2px solid var(--ink);
  border-radius: 999px;
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.06em;
  box-shadow: 2px 2px 0 var(--ink);
  white-space: nowrap;
}

/* ---------- page --------------------------------------------------------- */

.page {
  flex: 1;
  display: grid;
  grid-template-columns: 1.02fr 0.98fr;
  align-items: center;
  gap: clamp(26px, 4vw, 56px);
  padding: clamp(22px, 3.5vw, 38px) clamp(20px, 3.5vw, 40px);
}

/* ---------- verse -------------------------------------------------------- */

.verse {
  position: relative;
  min-width: 0;
  padding: 6px 0;
}

.sun-sticker {
  position: absolute;
  right: -4px;
  top: -18px;
  z-index: 0;
  width: clamp(64px, 7.6vw, 92px);
  height: auto;
  transform: rotate(8deg);
}

.verse-text {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  font-family: var(--fun);
  font-size: clamp(44px, 6.4vw, 92px);
  font-weight: 400;
  line-height: 1;
  letter-spacing: 0.01em;
  color: var(--ink);
}

.verse-text span {
  display: block;
  white-space: nowrap;
}

.verse-text .warm {
  color: var(--coral);
}

.squiggle {
  display: block;
  width: min(78%, 240px);
  height: auto;
  margin-top: 14px;
}

/* ---------- directory ---------------------------------------------------- */

.directory {
  position: relative;
  min-width: 0;
}

.star {
  position: absolute;
  right: -6px;
  top: -28px;
  z-index: 2;
  width: 34px;
  height: 34px;
  transform: rotate(12deg);
}

.dir-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.dir-head h2 {
  padding: 5px 11px;
  background: var(--yellow);
  border: 2px solid var(--ink);
  border-radius: 999px;
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 0.04em;
  box-shadow: 2px 2px 0 var(--ink);
}

.dir-head h2 span {
  font-family: var(--sans);
  font-weight: 400;
  opacity: 0.65;
}

.dir-count {
  padding: 5px 11px;
  background: var(--coral);
  color: #fff;
  border: 2px solid var(--ink);
  border-radius: 999px;
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.04em;
  box-shadow: 2px 2px 0 var(--ink);
  white-space: nowrap;
}

.dir-group + .dir-group {
  margin-top: 8px;
}

.group-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 0 2px 5px;
}

.group-head h3 {
  font-family: var(--fun);
  font-size: 14px;
  font-weight: 400;
  line-height: 1.2;
  letter-spacing: 0.01em;
  color: var(--ink);
}

.group-head h3::before {
  content: "";
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-right: 6px;
  background: var(--sky);
  border: 1.5px solid var(--ink);
  border-radius: 50%;
  vertical-align: 1px;
}

.dir-group.static .group-head h3::before {
  background: var(--mint);
}

.group-head h3 span {
  font-family: var(--mono);
  font-size: 8px;
  font-weight: 400;
  letter-spacing: 0.04em;
  color: var(--muted);
}

.group-count {
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 0.04em;
  color: var(--muted);
}

.url-list {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.url-list a {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr) auto 18px;
  align-items: center;
  gap: 9px;
  padding: 7px 12px;
  background: var(--card, #ffd8cb);
  border: 2px solid var(--ink);
  border-radius: 14px;
  box-shadow: 3px 3px 0 var(--ink);
  color: var(--ink);
}

.url-list li:nth-child(7n + 1) a {
  --card: #ffd8cb;
}

.url-list li:nth-child(7n + 2) a {
  --card: #fff0ae;
}

.url-list li:nth-child(7n + 3) a {
  --card: #cbf4df;
}

.url-list li:nth-child(7n + 4) a {
  --card: #d5edff;
}

.url-list li:nth-child(7n + 5) a {
  --card: #e7dcff;
}

.url-list li:nth-child(7n + 6) a {
  --card: #ffd7e6;
}

.url-list li:nth-child(7n + 7) a {
  --card: #d7f8ef;
}

.u-index {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  background: var(--ink);
  color: var(--paper);
  border-radius: 50%;
  font-family: var(--mono);
  font-size: 8px;
  line-height: 1;
}

.u-main {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.u-label {
  font-family: var(--fun);
  font-size: clamp(16px, 1.65vw, 21px);
  line-height: 1.1;
  letter-spacing: 0.01em;
}

.u-path {
  margin-top: 1px;
  font-family: var(--mono);
  font-size: 8px;
  line-height: 1.5;
  color: rgba(38, 32, 59, 0.62);
  overflow-wrap: anywhere;
}

.u-main.no-label .u-path {
  margin-top: 0;
  font-family: var(--sans);
  font-size: clamp(15px, 1.6vw, 20px);
  color: var(--ink);
}

.u-tier {
  padding: 2px 5px;
  background: var(--blue);
  color: #fff;
  border: 1.5px solid var(--ink);
  border-radius: 999px;
  font-family: var(--mono);
  font-size: 8px;
  line-height: 1;
  white-space: nowrap;
}

.u-tier.tier-test {
  background: var(--yellow);
  color: var(--ink);
}

.u-tier.tier-other {
  background: var(--lavender);
  color: var(--ink);
}

.u-go {
  justify-self: end;
  color: var(--ink);
  font-size: 17px;
  line-height: 1;
}

.url-list a:hover {
  background: #fff;
}

.url-list a:hover .u-go {
  color: var(--coral);
}

.urls-empty {
  padding: 14px;
  border: 2px dashed var(--ink);
  border-radius: 14px;
  font-family: var(--mono);
  font-size: 9px;
  color: var(--muted);
}

.dir-source {
  margin-top: 8px;
  text-align: right;
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 0.04em;
  color: var(--muted);
}

.dir-source span {
  color: var(--ink);
}

/* ---------- footer ------------------------------------------------------- */

.foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 6px 18px;
  padding: 10px clamp(18px, 3vw, 32px);
  border-top: 2px dashed var(--ink);
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.04em;
  color: var(--muted);
}

.foot-brand {
  font-family: var(--fun);
  font-size: 13px;
  color: var(--ink);
}

.foot-brand .oak {
  margin-right: 1px;
  font-family: var(--brand);
  font-size: 15px;
  font-weight: 600;
  font-style: italic;
  letter-spacing: -0.01em;
}

.icp {
  padding: 3px 10px;
  background: var(--white);
  border: 2px solid var(--ink);
  border-radius: 999px;
  color: var(--ink);
  box-shadow: 2px 2px 0 var(--ink);
}

.icp:hover {
  background: var(--yellow);
}

/* ---------- responsive --------------------------------------------------- */

@media (max-width: 900px) {
  body {
    padding: 8px 0;
  }

  .sheet {
    width: calc(100% - 16px);
    min-height: calc(100vh - 16px);
    margin: 0 auto;
    border-width: 2px;
    border-radius: 22px;
    box-shadow: 5px 5px 0 var(--ink);
  }

  .sheet::before {
    height: 8px;
  }

  .bar {
    padding: 12px 16px;
  }

  .brand-mark {
    width: 30px;
    height: 30px;
  }

  .brand-name {
    font-size: 27px;
  }

  .page {
    grid-template-columns: minmax(0, 1fr);
    align-items: start;
    gap: 30px;
    padding: 20px 16px 24px;
  }

  .sun-sticker {
    width: 68px;
    top: -10px;
    right: 0;
  }

  .verse-text {
    font-size: 12vw;
  }

  .star {
    width: 28px;
    top: -16px;
    right: 0;
  }

  .u-label {
    font-size: 20px;
  }

  .foot {
    padding: 9px 16px;
    font-size: 8.5px;
  }

  .foot-brand {
    font-size: 12px;
  }

  .foot-brand .oak {
    font-size: 14px;
  }
}

@media (max-width: 480px) {
  .bar-title {
    padding: 5px 9px;
    font-size: 8px;
  }

  .verse-text {
    font-size: 12.6vw;
  }

  .dir-head h2,
  .dir-count {
    padding: 4px 8px;
    font-size: 8px;
  }

  .u-label {
    font-size: 19px;
  }

  .foot {
    font-size: 8px;
  }
}
