:root {
  --paper: #f2efe8;
  --paper-bright: #faf8f3;
  --ink: #181a18;
  --muted: #656960;
  --line: #c9c7bd;
  --accent: #e9ff62;
  --terminal: #1d2a24;
  --mono: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  --sans: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", "Hiragino Kaku Gothic ProN", "Yu Gothic UI", Meiryo, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: linear-gradient(rgba(24,26,24,.025) 1px,transparent 1px), linear-gradient(90deg,rgba(24,26,24,.025) 1px,transparent 1px), var(--paper);
  background-size: 32px 32px;
  color: var(--ink);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
.skip-link { position: fixed; top: 8px; left: 8px; z-index: 100; padding: 10px 14px; background: var(--ink); color: #fff; transform: translateY(-160%); }
.skip-link:focus { transform: translateY(0); }
.site-shell { width: min(100% - 48px, 1180px); margin: 0 auto; }

.site-header { display: flex; align-items: center; justify-content: space-between; min-height: 96px; border-bottom: 1px solid var(--ink); }
.brand { display: inline-flex; align-items: center; gap: 12px; }
.brand-mark { display: grid; width: 42px; height: 42px; place-items: center; border-radius: 50%; background: var(--ink); color: var(--accent); font: 700 14px var(--mono); }
.brand strong,.brand small { display: block; }
.brand strong { font: 700 15px var(--mono); }
.brand small { margin-top: 3px; color: var(--muted); font: 9px var(--mono); letter-spacing: .05em; text-transform: uppercase; }
.global-nav { display: flex; gap: 30px; font: 12px var(--mono); }
.global-nav a,.site-footer a { border-bottom: 1px solid transparent; }
.global-nav a:hover,.global-nav a:focus-visible,.site-footer a:hover,.site-footer a:focus-visible { border-bottom-color: currentColor; }

.heading-note { font: 11px var(--mono); letter-spacing: .09em; text-transform: uppercase; }

.section { padding: 68px 0; border-bottom: 1px solid var(--ink); }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 24px; margin-bottom: 36px; }
.section-heading.compact { margin-bottom: 22px; }
.section-title { margin: 0; font: 700 clamp(16px,1.8vw,21px) var(--mono); letter-spacing: -.02em; }
.text-link { flex: 0 0 auto; padding-bottom: 4px; border-bottom: 1px solid var(--ink); font: 700 11px var(--mono); }
.text-link:hover,.text-link:focus-visible { background: var(--accent); }

.featured-list { margin: 0; padding: 0; border-top: 1px solid var(--ink); list-style: none; }
.featured-list a { display: grid; grid-template-columns: 48px minmax(0,1fr) 110px 20px; gap: 20px; align-items: center; min-height: 104px; padding: 18px 16px; border-bottom: 1px solid var(--line); transition: background 150ms ease,padding 150ms ease; }
.featured-list a:hover,.featured-list a:focus-visible { padding-right: 10px; padding-left: 22px; outline: none; background: var(--accent); }
.featured-number,.featured-type,.featured-arrow { font-family: var(--mono); }
.featured-number { color: var(--muted); font-size: 10px; }
.featured-body { min-width: 0; }
.featured-body strong,.featured-body small { display: block; }
.featured-body strong { font-size: 17px; letter-spacing: -.02em; }
.featured-body small { max-width: 620px; margin-top: 7px; color: var(--muted); font-size: 12px; line-height: 1.65; }
.featured-type { color: var(--muted); font-size: 9px; letter-spacing: .08em; text-align: right; }
.featured-arrow { text-align: right; }

.adsense-slot { width: 100%; margin: 42px auto 0; overflow: hidden; }
.adsense-slot-footer { max-width: 760px; margin-top: 72px; }

.directory-list { border-top: 1px solid var(--ink); }
.directory-row { display: grid; grid-template-columns: 38px minmax(190px,.7fr) 1fr 24px; gap: 18px; align-items: center; min-height: 76px; padding: 12px 16px; border-bottom: 1px solid var(--line); transition: background 150ms ease,padding 150ms ease; }
.directory-row:hover,.directory-row:focus-visible { padding-right: 10px; padding-left: 22px; outline: none; background: var(--accent); }
.folder-icon { position: relative; width: 25px; height: 18px; border: 1.5px solid currentColor; border-radius: 2px; }
.folder-icon::before { position: absolute; top: -6px; left: -1.5px; width: 11px; height: 5px; border: 1.5px solid currentColor; border-bottom: 0; border-radius: 2px 2px 0 0; content: ""; }
.directory-name { font: 700 14px var(--mono); }
.directory-description { color: var(--muted); font-size: 13px; }
.directory-arrow { font-family: var(--mono); }

.lower-grid { display: grid; grid-template-columns: 1.35fr .65fr; gap: clamp(50px,9vw,110px); }
.file-list { margin: 0; padding: 0; border-top: 1px solid var(--ink); list-style: none; }
.file-list a { display: grid; grid-template-columns: 30px 1fr 18px; gap: 14px; align-items: center; padding: 18px 8px; border-bottom: 1px solid var(--line); }
.file-list a:hover,.file-list a:focus-visible { background: var(--paper-bright); outline: none; }
.document-icon { position: relative; width: 17px; height: 22px; border: 1px solid currentColor; }
.document-icon::after { position: absolute; top: 4px; right: 3px; left: 3px; height: 1px; background: currentColor; box-shadow: 0 4px currentColor,0 8px currentColor; content: ""; }
.file-list strong,.file-list small { display: block; }
.file-list strong { font-size: 13px; }
.file-list small { margin-top: 5px; color: var(--muted); font: 9px var(--mono); }
.about-panel { padding: 30px; border: 1px solid var(--ink); background: var(--paper-bright); }
.about-panel > p { margin: 20px 0; color: var(--muted); font-size: 13px; line-height: 1.85; }
.prompt { margin: 32px -30px -30px; padding: 18px 20px; background: var(--terminal); color: #c8d1cb; font: 11px var(--mono); }
.prompt > span:first-child { margin-right: 7px; color: var(--accent); }
.cursor { display: inline-block; width: 6px; height: 12px; margin-left: 5px; background: var(--accent); vertical-align: -2px; animation: blink 1.1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }

.site-footer { display: grid; grid-template-columns: 1fr auto 1fr; gap: 30px; align-items: center; min-height: 140px; font: 10px var(--mono); }
.site-footer div strong,.site-footer div span { display: block; }
.site-footer div span { margin-top: 5px; color: var(--muted); }
.site-footer nav { display: flex; gap: 24px; }
.site-footer p { margin: 0; color: var(--muted); text-align: right; }

@media (max-width: 900px) {
  .lower-grid { grid-template-columns: 1fr; }
  .site-footer { grid-template-columns: 1fr auto; }
  .site-footer p { display: none; }
}
@media (max-width: 640px) {
  .site-shell { width: min(100% - 28px,1180px); }
  .site-header { min-height: 82px; }
  .brand small,.global-nav a:not(:first-child) { display: none; }
  .global-nav { gap: 14px; }
  .section { padding: 52px 0; }
  .section-heading { align-items: start; }
  .featured-list a { grid-template-columns: 30px 1fr 18px; gap: 12px; min-height: 92px; padding-right: 8px; padding-left: 8px; }
  .featured-type { display: none; }
  .featured-body strong { font-size: 14px; }
  .featured-body small { overflow: hidden; max-width: 32em; text-overflow: ellipsis; white-space: nowrap; }
  .adsense-slot { margin-top: 28px; }
  .directory-row { grid-template-columns: 32px 1fr 20px; gap: 12px; min-height: 70px; padding-right: 8px; padding-left: 8px; }
  .directory-description { display: none; }
  .directory-name { font-size: 12px; }
  .about-panel { padding: 24px; }
  .prompt { margin-right: -24px; margin-bottom: -24px; margin-left: -24px; }
  .site-footer { display: flex; min-height: 170px; flex-direction: column; align-items: flex-start; justify-content: center; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *,*::before,*::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
