/* dabloonery.com — layout: a mid-2000s software portal.
   Fixed-width column, banner, a row of tabs, titled boxes, a sidebar, dense small text.
   Colors come from tokens.css; shared pieces from components.css. */

/* ---- Type: Archivo for everything, wide for display; IBM Plex Mono for small labels ---- */
:root {
  --font-display: "Archivo", system-ui, sans-serif; --display-stretch: 125%; --display-weight: 700;
  --font-sans: "Archivo", system-ui, sans-serif; --font-mono: "IBM Plex Mono", ui-monospace, monospace;
  --shell: 980px;
}

html, body { overflow-x: clip; }
body { font-size: var(--text-sm); line-height: 1.5; background: var(--sunken); }

.skip { position: absolute; left: 12px; top: -48px; z-index: 10; padding: 8px 12px; background: var(--raised); border: 1px solid var(--line); border-radius: var(--radius-sm); color: var(--ink); }
.skip:focus { top: 8px; }

.shell { max-width: var(--shell); margin: 0 auto; padding: var(--space-4) var(--space-4) var(--space-6); }

/* ---- Banner ---- */
.banner {
  display: flex; align-items: center; justify-content: space-between; gap: var(--space-4); flex-wrap: wrap;
  padding: var(--space-4) var(--space-4); background: var(--raised);
  border: 1px solid var(--line); border-bottom: 3px solid var(--signature); border-radius: var(--radius-md) var(--radius-md) 0 0;
  box-shadow: inset 0 1px 0 var(--edge-hi);
}
.brand { display: flex; align-items: center; gap: var(--space-3); color: var(--ink); text-decoration: none; }
.brand > span { display: grid; gap: 2px; }
.brand-name { font: var(--display-weight) 1.75rem/1 var(--font-display); font-stretch: var(--display-stretch); letter-spacing: -0.02em; }
.brand-sub { font: var(--text-xs) var(--font-mono); color: var(--muted); }
.brand:hover .brand-name { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 4px; }

.banner-stats { display: flex; margin: 0; border: 1px solid var(--rule); border-radius: var(--radius-sm); background: var(--sunken); box-shadow: var(--recess); }
.banner-stats div { padding: 6px 14px; display: grid; gap: 1px; text-align: right; }
.banner-stats div + div { border-left: 1px solid var(--rule); }
.banner-stats dt { font: 500 10px var(--font-mono); text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.banner-stats dd { margin: 0; font: 600 var(--text-base)/1.2 var(--font-mono); color: var(--ink); font-variant-numeric: tabular-nums; }

/* ---- Tabs ---- */
.tabs { background: var(--surface); border: 1px solid var(--line); border-top: 0; padding: var(--space-2) var(--space-2) 0; }
.tabs-scroll { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; }
.tabs-scroll::-webkit-scrollbar { display: none; }
.tabs a {
  flex: none; display: inline-flex; align-items: center; gap: 6px; min-height: 34px; padding: 6px 14px;
  border: 1px solid var(--rule); border-bottom: 0; border-radius: var(--radius-sm) var(--radius-sm) 0 0;
  background: var(--sunken); color: var(--ink-soft); text-decoration: none; font-weight: 600;
}
.tabs a:hover { color: var(--ink); background: var(--raised-hover); }
.tabs a[aria-current="page"] {
  background: var(--raised); color: var(--ink); border-color: var(--line);
  box-shadow: inset 0 2px 0 var(--signature); position: relative; top: 1px;
}
.tabs .tab-out { margin-left: auto; background: none; border-color: transparent; font-weight: 500; }
.tabs .tab-out svg { width: 12px; height: 12px; }

/* ---- Frame: content + sidebar ---- */
.frame {
  display: grid; grid-template-columns: minmax(0, 1fr) 248px; gap: var(--space-4);
  padding: var(--space-4); background: var(--surface); border: 1px solid var(--line); border-top-color: var(--rule);
}
.content { outline: none; min-width: 0; }
.pane { display: grid; gap: var(--space-4); align-content: start; }
.js .pane:not(.is-active) { display: none; }
.sidebar { display: grid; gap: var(--space-4); align-content: start; }

/* ---- Boxes ---- */
.box { background: var(--raised); border: 1px solid var(--line); border-radius: var(--radius-sm); overflow: hidden; box-shadow: 0 1px 0 var(--edge-lo); }
.box-title {
  margin: 0; padding: 6px var(--space-3); background: var(--sunken); border-bottom: 1px solid var(--line);
  font: var(--display-weight) var(--text-xs)/1.4 var(--font-display); font-stretch: var(--display-stretch);
  text-transform: uppercase; letter-spacing: .06em; color: var(--ink);
  display: flex; align-items: center; gap: var(--space-2);
}
.box-title::before { content: ""; width: 6px; height: 6px; border-radius: 1px; background: var(--signature); flex: none; }
.box-body { margin: 0; padding: var(--space-3); }
.box-body > p { margin: 0; }
.box-row { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-4); }
.stack { display: grid; gap: var(--space-3); }
.stack > p { margin: 0; max-width: 62ch; }

.feature { display: flex; gap: var(--space-4); align-items: flex-start; }
.feature img { border-radius: 12px; flex: none; }
.feature-text { display: grid; gap: var(--space-2); min-width: 0; }
.feature-text p { margin: 0; }
.feature-name { margin: 0; display: flex; align-items: center; gap: var(--space-3); font: var(--display-weight) 1.5rem/1.1 var(--font-display); font-stretch: var(--display-stretch); }
.feature-name a { color: var(--ink); text-decoration: none; }
.feature-name a:hover { text-decoration: underline; }

.lead { font-size: var(--text-lg); line-height: 1.4; color: var(--ink); }
.soft { color: var(--ink-soft); }
.plain { margin: 0; padding-left: 1.1em; display: grid; gap: 4px; color: var(--ink-soft); max-width: 62ch; }
.plain li::marker { color: var(--signature); }

/* News: date column, then text, zebra rows like the old portals */
.news { list-style: none; padding: 0; }
.news li { display: grid; grid-template-columns: 96px 1fr; gap: var(--space-3); padding: 6px var(--space-3); }
.news li:nth-child(even) { background: var(--sunken); }
.news time { font: var(--text-xs)/1.9 var(--font-mono); color: var(--muted); }

/* ---- Specs readout ---- */
.specs {
  margin: 0; padding: var(--space-3); display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: var(--space-3);
  background: var(--sunken); border: 1px solid var(--rule); border-radius: var(--radius-sm); box-shadow: var(--recess);
}
.specs div { display: grid; gap: 2px; min-width: 0; }
.specs dt { font: 500 10px var(--font-mono); text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.specs dd { margin: 0; }

.actions { display: flex; flex-wrap: wrap; gap: var(--space-2); }
.actions .db-btn { text-decoration: none; }
/* Tirekick's own button, in its own colors (from its lib/theme.js), in both themes. */
.tk-btn { background: #ff8f3a; color: #1a2b4c; border-color: #d96f1f; border-radius: 999px; font-weight: 600; box-shadow: inset 0 1px 0 rgb(255 255 255 / .25), 0 2px 0 #b8560f; }
.tk-btn:hover { background: #ff9d52; }
.tk-btn:active { transform: translateY(2px); box-shadow: inset 0 1px 2px rgb(0 0 0 / .2); }

/* ---- Rules ---- */
.rules { margin: 0; padding: 0; list-style: none; counter-reset: r; display: grid; max-width: 62ch; border: 1px solid var(--rule); border-radius: var(--radius-sm); }
.rules li { counter-increment: r; display: grid; grid-template-columns: 2.5em 1fr; gap: var(--space-2); padding: 8px var(--space-3); }
.rules li + li { border-top: 1px solid var(--rule); }
.rules li:nth-child(even) { background: var(--sunken); }
.rules li::before { content: counter(r, decimal-leading-zero); font: 500 var(--text-xs)/1.9 var(--font-mono); color: var(--muted); }

/* ---- Contact ---- */
.readout {
  display: flex; align-items: center; gap: var(--space-3); max-width: 480px; padding: 6px 6px 6px var(--space-3);
  background: var(--sunken); border: 1px solid var(--rule); border-radius: var(--radius-sm); box-shadow: var(--recess);
}
.readout .db-label { color: var(--muted); }
.readout a { flex: 1; min-width: 0; font: var(--text-sm) var(--font-mono); overflow-wrap: anywhere; }
#copy-note { margin: 0; min-height: 1.4em; }

/* ---- Sidebar pieces ---- */
.side-list { list-style: none; padding: 4px; display: grid; gap: 2px; }
.side-list a, .side-list .side-item { display: flex; align-items: center; gap: var(--space-2); min-height: 32px; padding: 4px 8px; border-radius: var(--radius-sm); color: var(--ink); text-decoration: none; font-weight: 600; }
.side-list a:hover { background: var(--raised-hover); }
.side-list .nm { flex: 1; }
.side-list .db-status { font-weight: 400; }
.side-list img { border-radius: 4px; flex: none; }
.tool-glyph {
  display: inline-grid; place-items: center; width: 16px; height: 16px; flex: none; border-radius: 4px;
  background: var(--raised-hover); border: 1px solid var(--line); color: var(--ink-soft); font: 600 10px/1 var(--font-mono);
}
.keys-list { display: grid; grid-template-columns: auto 1fr; gap: var(--space-2) var(--space-3); align-items: center; }
.keys-list dt { text-align: right; white-space: nowrap; }
.keys-list dd { margin: 0; color: var(--ink-soft); }
.box-body.keys-list { margin: 0; }
@media (hover: none) { .keys-box { display: none; } }
.facts { list-style: none; padding: var(--space-2) var(--space-3); display: grid; gap: 4px; color: var(--ink-soft); }
.facts li { display: flex; gap: var(--space-2); }
.facts li::before { content: "+"; font-family: var(--font-mono); color: var(--ok); }

/* ---- Footer ---- */
.foot {
  display: flex; align-items: center; flex-wrap: wrap; gap: var(--space-2) var(--space-3);
  padding: var(--space-2) var(--space-4); background: var(--raised); border: 1px solid var(--line); border-top: 0;
  border-radius: 0 0 var(--radius-md) var(--radius-md); color: var(--muted); font: var(--text-xs) var(--font-mono);
}
.foot a { color: var(--ink-soft); }
.foot .sep { color: var(--rule); }
.foot .grow { flex: 1; }
.foot .db-segmented span { padding: 3px 10px; min-height: 24px; font-size: var(--text-xs); }
.link-btn { font: inherit; color: var(--ink-soft); background: none; border: 0; padding: 4px 2px; min-height: 24px; text-decoration: underline; text-underline-offset: 2px; cursor: pointer; }
.link-btn:hover, .foot a:hover { color: var(--ink); }

/* ---- About ---- */
.about-mark { padding: 4px; border: 0; background: none; border-radius: var(--radius-md); cursor: pointer; }
.about-mark:active { transform: translateY(1px); }
.about-name { font-weight: 600; }
.db-about p { margin: 0; font-size: var(--text-sm); }
.db-about .db-meta { font-size: var(--text-xs); }
.log { width: 100%; text-align: left; display: grid; gap: var(--space-2); padding: var(--space-3); background: var(--sunken); border: 1px solid var(--rule); border-radius: var(--radius-sm); box-shadow: var(--recess); }
.log .db-label { color: var(--muted); }
.log ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; font: var(--text-xs)/1.5 var(--font-mono); color: var(--ink-soft); }

/* A hand-placed sticker for tools still in beta. Fixed colors: the same in both themes, 12.6:1. */
.sticker {
  display: inline-block; transform: rotate(4deg); padding: 3px 8px 2px; border-radius: 3px; color: #1b1d21; background: #facc15;
  font: 600 10px/1.2 var(--font-mono); text-transform: uppercase; letter-spacing: .08em; box-shadow: 0 1px 0 rgb(0 0 0 / .25);
  vertical-align: middle;
}

/* ---- Narrower: sidebar drops below; phone: everything stacks ---- */
@media (max-width: 820px) {
  .frame { grid-template-columns: 1fr; }
  .sidebar { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
}
@media (max-width: 560px) {
  .shell { padding: 0 0 var(--space-4); }
  .banner, .foot { border-radius: 0; border-left: 0; border-right: 0; }
  .tabs, .frame { border-left: 0; border-right: 0; }
  .banner { padding: var(--space-3) var(--space-4); }
  .brand-name { font-size: 1.4rem; }
  .banner-stats { width: 100%; }
  .banner-stats div { flex: 1; text-align: left; }
  .frame { padding: var(--space-3); gap: var(--space-3); }
  .box-row { grid-template-columns: 1fr; }
  .feature { flex-direction: column; gap: var(--space-3); }
  .feature img { width: 56px; height: 56px; }
  .news li { grid-template-columns: 1fr; gap: 0; }
  .foot .grow { flex-basis: 100%; height: 0; }
}

/* ---- v4: more color on the page, the fun in plain sight ---- */

/* Tirekick's boxes wear Tirekick's colors (navy title bar, orange marker), in both themes. */
.box--tk .box-title { background: #1c2433; color: #f4f6fa; border-bottom-color: #2c3850; }
.box--tk .box-title::before { background: #ff8f3a; }
.box--me .box-title::before { border-radius: 50%; }

/* Featured: text left, a slice of the real panel right. */
.feature--split { position: relative; padding-right: 0; padding-bottom: 0; }
.feature--split .feature-text { flex: 1; padding-bottom: var(--space-3); }
.peek {
  flex: none; width: 210px; height: 190px; overflow: hidden; align-self: flex-end;
  border: 1px solid #2c3850; border-bottom: 0; border-right: 0; border-radius: var(--radius-sm) 0 0 0; background: #1c2433;
}
.peek img { width: 100%; height: auto; display: block; transition: transform .25s var(--ease, ease); }
.peek:hover img { transform: translateY(-24px); }
@media (prefers-reduced-motion: reduce) { .peek img { transition: none; } }

.shot { margin: 0; display: grid; gap: var(--space-2); }
.shot img { width: 100%; height: auto; display: block; border: 1px solid var(--line); border-radius: var(--radius-sm); }
.shot figcaption { font: var(--text-xs) var(--font-mono); color: var(--muted); }

/* About me: a profile box */
.box-row { grid-template-columns: 3fr 2fr; }
.profile { display: flex; gap: var(--space-3); align-items: flex-start; }
.profile .db-mark { flex: none; }
.profile-text { display: grid; gap: var(--space-3); min-width: 0; }
.profile-text p { margin: 0; }
.profile-facts { margin: 0; display: grid; border-top: 1px solid var(--rule); }
.profile-facts div { display: grid; grid-template-columns: 96px 1fr; gap: var(--space-3); padding: 5px 0; border-bottom: 1px solid var(--rule); }
.profile-facts dt { font: 500 10px/2 var(--font-mono); text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.profile-facts dd { margin: 0; }

/* News tags, like the category labels on old news lists */
.tag { display: inline-block; margin-right: 6px; padding: 1px 6px; border-radius: 3px; font: 600 10px/1.5 var(--font-mono); text-transform: uppercase; letter-spacing: .06em; vertical-align: 1px; }
.tag--tk { background: #1c2433; color: #ff8f3a; box-shadow: inset 0 0 0 1px #2c3850; }
.tag--site { color: var(--ink); box-shadow: inset 0 0 0 1px var(--signature); }

/* Tip box */
.tip { display: grid; gap: var(--space-2); justify-items: start; }
.tip p { margin: 0; min-height: 3em; }

.banner-stats { flex-wrap: wrap; }
@media (max-width: 560px) {
  .box-row { grid-template-columns: 1fr; }
  .feature--split { padding-right: var(--space-3); }
  .peek { width: 100%; height: 150px; border-right: 1px solid #2c3850; border-radius: var(--radius-sm) var(--radius-sm) 0 0; }
  .peek img { width: 220px; margin: 0 auto; }
  .banner-stats div { flex: 1 0 40%; }
  .banner-stats div:nth-child(3) { border-left: 0; }
  .banner-stats div:nth-child(n+3) { border-top: 1px solid var(--rule); }
  .profile .db-mark { display: none; }
  .profile-facts div { grid-template-columns: 1fr; gap: 0; }
}

/* Tirekick's wordmark, as Tirekick draws it (lib/theme.js): lowercase Bricolage Grotesque at 800 and 85% width,
   the i's dotted with orange tread dots. The font file is cut down to just these letters (5 KB). */
@font-face { font-family: "TK Display"; src: url("fonts/tirekick-wordmark.woff2") format("woff2"); font-weight: 700 800; font-stretch: 85%; font-display: swap; }
.tk-wordmark { font: 800 1.75rem/1 "TK Display", "Arial Narrow", system-ui, sans-serif; font-stretch: 85%; letter-spacing: -.035em; color: var(--ink); text-decoration: none; white-space: nowrap; }
.tk-wordmark .wm-i { position: relative; display: inline-block; }
.tk-wordmark .wm-i::after { content: ""; position: absolute; left: 50%; top: .075em; width: .19em; height: .19em; margin-left: -.095em; border-radius: 50%; background: #ff8f3a; }
a.tk-wordmark:hover { text-decoration: none; opacity: .85; }
