/* THISGUY.NEWS — one page, its colours the colour library's tokens (/common/theme.css), the platform's own light or dark */
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0 auto; max-width: 1080px; padding: 0 16px 64px; background: var(--bg); color: var(--ink); font: 16px/1.45 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; }
a { color: var(--link, var(--ink)); }
button, input, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }

/* THE TOP: the wordmark and who is signed in */
.top { display: flex; align-items: center; justify-content: space-between; gap: 12px; height: 64px; }
.mark { font-size: 24px; font-weight: 400; letter-spacing: -0.02em; text-decoration: none; color: var(--ink); }
.mark b { font-weight: 800; }
.who { display: flex; align-items: center; gap: 8px; min-width: 0; }
.who .me { display: flex; align-items: center; gap: 8px; text-decoration: none; color: var(--ink); min-width: 0; }
.who .me .name { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 40vw; }
.btn { height: 36px; padding: 0 14px; border-radius: 18px; border: 1px solid var(--line); background: var(--surface); display: inline-flex; align-items: center; justify-content: center; text-decoration: none; color: var(--ink); white-space: nowrap; }
.btn.go { background: var(--ink); color: var(--bg); border-color: var(--ink); font-weight: 600; }
.btn:disabled { opacity: 0.5; cursor: default; }
.circle { width: 32px; height: 32px; flex: none; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; color: #fff; font-weight: 700; font-size: 14px; background: hsl(var(--h, 0) 45% 45%); overflow: hidden; }
.circle img { width: 100%; height: 100%; object-fit: cover; }

/* THE COMPOSER, at the top */
.compose { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 12px; margin-bottom: 12px; }
.compose textarea { display: block; width: 100%; min-height: 64px; resize: vertical; border: 0; outline: 0; background: transparent; padding: 4px; }
.compose .row { display: flex; gap: 8px; align-items: center; margin-top: 8px; }
.compose input[type="url"] { flex: 1; min-width: 0; height: 36px; padding: 0 12px; border: 1px solid var(--line); border-radius: 18px; background: var(--bg); outline: 0; }
.compose .note { color: var(--ink-2); font-size: 14px; }
.compose .error { color: var(--danger); font-size: 14px; margin-top: 6px; }
.compose.out { display: flex; align-items: center; justify-content: space-between; gap: 12px; }

/* THE TOPICS, at the top */
.topics { display: flex; gap: 6px; overflow-x: auto; padding: 2px 0 12px; scrollbar-width: none; }
.topics::-webkit-scrollbar { display: none; }
.chip { height: 32px; padding: 0 12px; border-radius: 16px; border: 1px solid var(--line); background: transparent; white-space: nowrap; flex: none; display: inline-flex; align-items: center; gap: 6px; }
.chip .n { color: var(--ink-2); font-size: 13px; }
.chip.on { background: var(--chip-on); color: var(--chip-on-ink); border-color: var(--chip-on); font-weight: 600; }

/* THE FRAME: the days on the left, the list beside them */
.frame { display: grid; grid-template-columns: 180px minmax(0, 1fr); gap: 20px; align-items: start; }
.days { position: sticky; top: 12px; display: flex; flex-direction: column; gap: 2px; max-height: calc(100vh - 24px); overflow-y: auto; }
.days .head { font-size: 12px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--ink-2); margin: 14px 10px 4px; }
.days a { display: block; padding: 6px 10px; border-radius: 8px; text-decoration: none; color: var(--ink); white-space: nowrap; }
.days a.on { background: var(--chip-on); color: var(--chip-on-ink); font-weight: 600; }

/* THE LIST */
.list .word { color: var(--ink-2); padding: 24px 4px; }
.post { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; margin-bottom: 10px; }
.post .by { display: flex; align-items: center; gap: 10px; }
.post .names { display: flex; flex-direction: column; min-width: 0; line-height: 1.2; }
.post .alias { font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.post .acct { font: 12px/1.3 ui-monospace, SFMono-Regular, Menlo, monospace; color: var(--ink-2); }
.post .acct.alone { font-size: 14px; font-weight: 600; color: var(--ink); }
.post .when { margin-left: auto; color: var(--ink-2); font-size: 13px; white-space: nowrap; }
.post .text { margin: 10px 0 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.post .link { display: block; margin-top: 10px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; text-decoration: none; color: var(--ink); background: var(--bg); }
.post .link:hover { border-color: var(--ink-2); }
.post .host { display: block; font-size: 13px; color: var(--ink-2); }
.post .title { display: block; font-weight: 600; overflow-wrap: anywhere; }
.post .summary { display: block; margin-top: 4px; font-size: 14px; color: var(--ink-2); }
.post .tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.post .tags .chip { height: 26px; font-size: 13px; padding: 0 10px; }
.post .acts { display: flex; align-items: center; gap: 8px; margin-top: 10px; }
.post .like { height: 32px; padding: 0 12px; border-radius: 16px; border: 1px solid var(--line); background: transparent; display: inline-flex; align-items: center; gap: 6px; }
.post .like .e { filter: grayscale(1); opacity: 0.6; }
.post .like.on { background: var(--chip-on); border-color: var(--chip-on); font-weight: 600; }
.post .like.on .e { filter: none; opacity: 1; }
.post .hide { margin-left: auto; height: 32px; border: 0; background: transparent; color: var(--ink-2); font-size: 14px; }
.post .ask { margin-left: auto; display: flex; align-items: center; gap: 8px; font-size: 14px; }
.post .ask .btn { height: 32px; }
.post .ask .stop { background: var(--stop); color: var(--on-stop); border-color: var(--stop); }

/* THE ACCOUNT */
.account { max-width: 560px; }
.account h1 { font-size: 22px; margin: 8px 0 16px; }
.account section { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 14px; margin-bottom: 12px; }
.account h2 { font-size: 15px; margin: 0 0 8px; }
.account .note { color: var(--ink-2); font-size: 14px; margin: 6px 0 0; }
.account .row { display: flex; gap: 8px; align-items: center; }
.account input { flex: 1; min-width: 0; height: 36px; padding: 0 12px; border: 1px solid var(--line); border-radius: 18px; background: var(--bg); outline: 0; }
.account .id { font: 15px ui-monospace, SFMono-Regular, Menlo, monospace; }
.account .hidden-row { display: flex; align-items: center; gap: 10px; padding: 6px 0; border-top: 1px solid var(--line); }
.account .hidden-row:first-of-type { border-top: 0; }
.account .error { color: var(--danger); font-size: 14px; margin-top: 6px; }

/* THE 404 */
body.missing main { padding: 30vh 0 0; text-align: center; }
body.missing .word { font-size: 22px; }

/* A NARROW SCREEN: the days a row of their own above the list */
@media (max-width: 720px) {
  .frame { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .days { position: static; flex-direction: row; overflow-x: auto; max-height: none; gap: 6px; padding-bottom: 12px; scrollbar-width: none; }
  .days::-webkit-scrollbar { display: none; }
  .days .head { display: none; }
  .days a { flex: none; border: 1px solid var(--line); border-radius: 16px; padding: 5px 12px; }
  .who .me .name { display: none; }
}
