/* dirtytenletterword.com — warm skin.
   Keeps the horizontal band structure and its hairline rules, drops every
   type-specimen device.

   Palette is LinkedIn's: their feed ground (#f4f2ee) happens to be a warm grey,
   so the warmth survives the switch. Blue #0a66c2 is their primary, #004182 its
   pressed state, and text sits at 90%/60% black exactly as it does there. */

:root {
  --paper: #f4f2ee;
  --surface: #ffffff;
  --ink: rgba(0, 0, 0, 0.9);
  --muted: rgba(0, 0, 0, 0.6);
  --accent: #0a66c2;
  --accent-dark: #004182;
  --hair: rgba(0, 0, 0, 0.55);
  --faint: rgba(0, 0, 0, 0.12);
  --serif: Georgia, "Times New Roman", Times, serif;
  --mono: "Courier New", Courier, monospace;
  --pad: 26px;
  --label-w: 150px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--serif);
  font-size: 17px;
  line-height: 1.6;
}

a { color: var(--accent); text-decoration: none; border-bottom: 1px solid currentColor; }
a:hover { color: var(--accent-dark); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

/* The only non-serif voice: quiet structural labels. */
.band-label, .hint, .column h3, .warn {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

/* ---- Horizontal bands ---- */

.band {
  display: grid;
  grid-template-columns: var(--label-w) minmax(0, 1fr);
  border-bottom: 1px solid var(--hair);
}

.band-label {
  padding: 22px var(--pad);
  border-right: 1px solid var(--faint);
  color: var(--muted);
}

.band-body { padding: 22px var(--pad); min-width: 0; }

/* ---- Masthead ---- */

h1 {
  margin: 0;
  font-size: clamp(46px, 12vw, 130px);
  font-weight: normal;
  line-height: 0.94;
  letter-spacing: -0.025em;
}

.tagline {
  margin: 20px 0 0;
  padding-top: 14px;
  border-top: 1px solid var(--faint);
  font-size: 16px;
  color: var(--muted);
}

/* ---- The phrase ---- */

.phrase {
  margin: 0;
  font-size: clamp(34px, 9.5vw, 104px);
  font-weight: bold;
  line-height: 1.02;
  letter-spacing: -0.025em;
  overflow-wrap: break-word;
}

.phrase .w1, .phrase .w2, .phrase .w3 {
  display: block;
  white-space: nowrap;
  margin-left: 0;
}

.phrase.placeholder {
  font-size: clamp(19px, 4vw, 28px);
  font-weight: normal;
  font-style: italic;
  letter-spacing: 0;
  color: var(--muted);
}

/* ---- Controls ---- */

#generate {
  display: block;
  width: 100%;
  background: var(--accent);
  border: 1px solid var(--accent);
  padding: 20px 16px;
  cursor: pointer;
  color: #fff;
  font-family: var(--mono);
  font-size: clamp(17px, 3.4vw, 24px);
  letter-spacing: 0.3em;
  text-indent: 0.3em;           /* balance the trailing letterspace */
  text-transform: uppercase;
  min-height: 72px;
}
#generate:hover { background: var(--accent-dark); border-color: var(--accent-dark); }

.minor { display: flex; flex-wrap: wrap; gap: 26px; margin: 18px 0 0; }
.minor button, .minor a {
  background: none;
  border: 0;
  border-bottom: 1px solid currentColor;
  padding: 8px 0;
  cursor: pointer;
  font-family: var(--serif);
  font-size: 16px;
  color: var(--accent);
  min-height: 44px;
}
.minor button:hover, .minor a:hover { color: var(--accent-dark); }

.hint { margin: 18px 0 0; color: var(--muted); }

/* ---- Suggested post ---- */

.post {
  margin: 22px 0 0;
  background: var(--surface);
  border: 1px solid rgba(0, 0, 0, 0.15);
  border-radius: 8px;
  overflow: hidden;
  max-width: 62ch;
}
.post[hidden] { display: none; }
.post:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

.post-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  padding: 11px 18px;
  border-bottom: 1px solid var(--faint);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}

.post-body {
  margin: 0;
  padding: 20px 18px;
  white-space: pre-wrap;      /* the line breaks are the joke */
  font-size: 16px;
  line-height: 1.62;
  overflow-wrap: break-word;
}

.post-actions {
  display: flex;
  flex-wrap: wrap;
  border-top: 1px solid var(--faint);
}
.post-actions button {
  flex: 1 1 auto;
  background: none;
  border: 0;
  border-right: 1px solid var(--faint);
  padding: 14px 12px;
  cursor: pointer;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink);
  min-height: 48px;
}
.post-actions button:last-child { border-right: 0; }
.post-actions button { color: var(--accent); }
.post-actions button:hover { background: var(--accent); color: #fff; }

/* ---- The words ---- */

.columns { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.column { min-width: 0; border-right: 1px solid var(--faint); padding-right: 16px; }
.column:not(:first-child) { padding-left: 16px; }
.column:last-child { border-right: 0; padding-right: 0; }

.column h3 {
  margin: 0 0 12px;
  padding-bottom: 9px;
  border-bottom: 1px solid var(--faint);
  font-weight: normal;
  color: var(--muted);
}

.column ul {
  list-style: none;
  margin: 0;
  padding: 0;
  max-height: 290px;
  overflow-y: auto;
  font-size: 16px;
  line-height: 1.7;
  overflow-wrap: break-word;
}
.column li { padding: 1px 6px 1px 0; }
.column li.on {
  background: var(--accent);
  color: #fff;
  padding-left: 6px;
}

/* ---- Notes ---- */

.prose { max-width: 62ch; }
.prose p { margin: 0 0 16px; }
.prose b { font-weight: bold; }

.warn {
  margin: 26px 0 0;
  padding-top: 14px;
  border-top: 2px solid var(--accent);
  color: var(--muted);
  line-height: 1.7;
}
.warn p { margin: 0; }

/* ---- Narrow: the label becomes a strip above its band ---- */

@media (max-width: 720px) {
  .band { grid-template-columns: 1fr; }
  .band-label {
    border-right: 0;
    border-bottom: 1px solid var(--faint);
    padding: 12px var(--pad);
  }
  .columns { grid-template-columns: 1fr; }
  .column {
    border-right: 0;
    border-bottom: 1px solid var(--faint);
    padding: 0 0 16px;
    margin-bottom: 16px;
  }
  .column:not(:first-child) { padding-left: 0; }
  .column:last-child { border-bottom: 0; margin-bottom: 0; }
  .column ul { max-height: 176px; }
}

@media (max-width: 420px) {
  :root { --pad: 16px; }
  #generate { letter-spacing: 0.2em; text-indent: 0.2em; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}
