/* ************************************************************************* */
/*                    LAAN SHARED CSS                                       */
/* ************************************************************************* */

/*
 * =========================================================================
 * CSS PLACEMENT RULES (FOR AI AGENTS AND DEVELOPERS)
 * =========================================================================
 *
 * This project uses a two-tier CSS architecture:
 *
 *   1. laan.css   — Global shared styles (this file)
 *   2. <style>    — Page-specific styles (inline in each HTML file)
 *
 * -------------------------------------------------------------------------
 * WHAT GOES IN laan.css (this file):
 * -------------------------------------------------------------------------
 *   - Theme variables and color tokens
 *   - Font declarations (@font-face)
 *   - Global reset and base element styles
 *   - Shared layout styles reused by multiple pages
 *
 * -------------------------------------------------------------------------
 * WHAT GOES IN PAGE <style> BLOCKS:
 * -------------------------------------------------------------------------
 *   - Styles unique to one page only
 *   - Page-specific layout behavior
 *
 * -------------------------------------------------------------------------
 * RULES:
 * -------------------------------------------------------------------------
 *   1. Prefer CSS variables for all colors.
 *   2. Keep shared styles in this file; page-only styles stay inline.
 *   3. Keep this file minimal and readable.
 *
 * =========================================================================
 */

/* @font-face {
  font-family: pageMono;
  src: url('./NotoMono-Regular.ttf') format('truetype');
  font-display: swap;
} */

@font-face {
  font-family: pageMono;
  src: url('./NeogreyRegular.otf') format('opentype');
  font-display: swap;
}

@font-face {
  font-family: pageKanji;
  src: url('./GenShin.ttf') format('truetype');
  font-display: swap;
}

:root {
  --font-family: "pageMono", "IBM Plex Mono", "Courier New", Courier, monospace;
  --primary-color: #000000;
  --secondary-color: #ffffff;
  --accent-color: #ff0000;
  --muted-color: #dddddd;

  --color: var(--primary-color);
  --background-color: var(--secondary-color);

  color-scheme: light;
}

:root[data-theme='dark'] {
  --primary-color: #f5f5f5;
  --secondary-color: #0b0b0b;
  --accent-color: #ff6b6b;
  --muted-color: #4a4a4a;

  --color: var(--primary-color);
  --background-color: var(--secondary-color);

  color-scheme: dark;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html,
body {
  width: 100%;
  min-height: 100%;
  color: var(--color);
  background: var(--background-color);
  font-family: var(--font-family);
}

a {
  color: var(--primary-color);
  text-decoration: none;
  transition: color 0.2s ease;
}

a:visited {
  color: var(--primary-color);
}

a:hover,
a:focus-visible,
a:visited:hover,
a:visited:focus-visible {
  color: var(--accent-color);
}

main {
  max-width: 1100px;
  margin: 0 auto;
  padding: 24px;
}

h1 {
  margin: 0 0 20px;
  font-size: 1.8rem;
  font-weight: 700;
}

table {
  width: 100%;
  border-collapse: collapse;
  border-spacing: 0;
  margin-bottom: 14px;
}

th,
td {
  text-align: left;
  vertical-align: top;
  padding: 8px 10px;
  border: none;
  color: var(--color);
}

.section-row td {
  font-weight: 700;
  font-size: 130%;
  text-align: center;
  padding-top: 18px;
  padding-bottom: 6px;
}

tbody tr:not(.section-row) td:first-child {
  /* font-weight: 700; */
}

tbody tr:not(.section-row) td:nth-child(2) {
  font-size: 70%;
}

tbody tr:not(.section-row) td:nth-child(n+3) a {
  font-size: 70%;
}

.muted {
  color: var(--muted-color);
}

/* ========================================================================== */
/* index-016 page styles moved from inline index.html style block             */
/* ========================================================================== */

html.index-016-page,
body.index-016-page {
  width: 100%;
  height: 100%;
  min-height: 100%;
  overflow: hidden;
}

.index-016-page {
  overflow: hidden;
}

:root {
  --glyph-stroke-color: var(--primary-color);
  --glyph-fill-color: var(--background-color);
  --glyph-shape-rendering: geometricPrecision;
  --glyph-stroke-width: 6;
  --glyph-linejoin: round;
  --glyph-linecap: round;
  --glyph-miterlimit: 4;
  --directory-link-col-width: 7ch;
  --directory-desc-col-min: 28ch;
  --directory-desc-col-ideal: 46ch;
  --directory-desc-col-max: 62ch;
}

.index-016-page .svg-stage {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  background: var(--background-color);
}

.index-016-page .name-group {
  fill: none;
  stroke: var(--glyph-stroke-color);
}

.index-016-page .glyph-path {
  shape-rendering: var(--glyph-shape-rendering);
  stroke-width: var(--glyph-stroke-width);
  stroke-linejoin: var(--glyph-linejoin);
  stroke-linecap: var(--glyph-linecap);
  stroke-miterlimit: var(--glyph-miterlimit);
}

.index-016-page .directory-text {
  position: fixed;
  left: 16px;
  right: 16px;
  top: 120px;
  bottom: 16px;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 420ms ease, transform 420ms ease;
  pointer-events: none;
  z-index: 6;
  color: var(--color);
  font: 400 12px/1.35 var(--font-family);
  white-space: normal;
  word-break: break-word;
  overflow: auto;
}

.index-016-page .directory-text.visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.index-016-page .directory-table {
  width: max-content;
  border-collapse: collapse;
  table-layout: auto;
  font: 400 12px/1.35 var(--font-family);
  color: var(--color);
}

.index2-page .directory-cards {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.index2-page .directory-section {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.index2-page .directory-section-title {
  margin: 0;
  padding: 2px 0;
  font: 400 24px/1.35 var(--font-family);
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.index2-page .directory-card {
  border: 1px solid var(--muted-color);
  border-radius: 5px;
  padding: 8px 10px;
}

.index2-page .directory-card-name {
  margin: 0;
  font: 400 18px/1.35 var(--font-family);
  text-align: center;
}

.index2-page .directory-card-name::after {
  content: '';
  display: block;
  width: 4ch;
  border-top: 1px solid var(--muted-color);
  margin: 4px auto 0;
}

.index2-page .directory-card-desc {
  margin: 6px 0;
  font: 400 12px/1.35 var(--font-family);
  text-align: center;
}

.index2-page .directory-card-links {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
}

.index2-page .directory-card-links a {
  font: 400 12px/1.35 var(--font-family);
}

.index-016-page .directory-table col:nth-child(1) { width: var(--directory-name-col-width, 180px); }
.index-016-page .directory-table col:nth-child(2) {
  width: clamp(
    var(--directory-desc-col-min),
    var(--directory-desc-col-ideal),
    var(--directory-desc-col-max)
  );
}
.index-016-page .directory-table col:nth-child(3),
.index-016-page .directory-table col:nth-child(4),
.index-016-page .directory-table col:nth-child(5) { width: var(--directory-link-col-width); }

.index-016-page .directory-table td {
  padding: 4px 8px;
  border-top: 1px solid #e3e3e3;
  vertical-align: top;
  word-break: break-word;
}

.index-016-page .directory-table .section-row td {
  border-top: 0;
  padding: 10px 8px 6px;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  background: transparent;
}

.index-016-page .directory-table tr:not(.section-row) td:first-child {
  white-space: nowrap;
  word-break: normal;
}

.index-016-page .directory-table tr:not(.section-row) td:nth-child(2) {
  white-space: normal;
  word-break: break-word;
  overflow-wrap: anywhere;
}

.index-016-page .directory-row {
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 180ms linear, transform 180ms ease;
}

.index-016-page .directory-row.visible {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 700px) {
  :root {
    --directory-link-col-width: 7ch;
    --directory-desc-col-min: 15ch;
    --directory-desc-col-max: 18ch;
  }

  .index-016-page .directory-text {
    bottom: 12px;
    font-size: 11px;
    line-height: 1.3;
  }

  .index-016-page .directory-table {
    display: inline-table;
    width: auto;
    min-width: 0;
    table-layout: auto;
  }

  .index2-page .directory-cards {
    gap: 12px;
  }

  .index2-page .directory-section {
    gap: 8px;
  }

  .index2-page .directory-card {
    padding: 7px 8px;
  }

  .index2-page .directory-card-links {
    gap: 10px;
  }

  .index-016-page .directory-table .section-row td {
    font-size: 11px;
    padding: 8px 6px 5px;
  }

  .index-016-page .directory-table td {
    padding: 3px 6px;
  }
}
