/* Kopi Break. Shared styles. No external assets.
   The first part is the approved mockup stylesheet; site additions are at the end.
   Art direction: Singapore tabloid + hawker signboard.
   White and black base. Flat colour blocks. Read = red, Talk = green, Alerts = yellow on black. */
:root {
  --black: #000;
  --white: #fff;
  --red: #E30613;
  --yellow: #FFD400;
  --green: #00704A;
  --sec: var(--red);
  --sec-on: #fff;
  --head: Impact, "Arial Black", "Helvetica Neue Condensed Bold", "Haettenschweiler", sans-serif;
  --body: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Noto Sans", "Noto Sans Tamil", "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
  --stripe: repeating-linear-gradient(-45deg, #000 0, #000 12px, #FFD400 12px, #FFD400 24px);
}
body.talk { --sec: var(--green); }
body.alerts { --sec: #000; --sec-on: var(--yellow); }
body.plain { --sec: #000; }

* { box-sizing: border-box; }
html { font-size: 20px; background: #fff; }
html.big { font-size: 23px; }
body {
  margin: 0 auto;
  max-width: 390px;
  min-height: 100vh;
  background: #fff;
  color: #000;
  font-family: var(--body);
  line-height: 1.45;
  padding-bottom: 104px; /* room for bottom tabs */
}
main { padding: 16px; }
h1, h2, h3, .kicker, .btn, .tag, .tabs a, .brand, .back, label {
  font-family: var(--head);
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}
h1 { font-size: 2.6rem; line-height: 0.98; margin: 0 0 12px; }
h2 { font-size: 1.8rem; line-height: 1; margin: 28px 0 12px; }
h3 { font-size: 1.4rem; line-height: 1.05; margin: 0 0 6px; }
p { margin: 0 0 12px; }
a { color: #000; font-weight: 700; text-decoration-thickness: 3px; text-underline-offset: 3px; }
.muted { font-size: 0.9rem; font-weight: 600; }
svg.i { width: 1.5em; height: 1.5em; flex: none; fill: currentColor; }
svg.i .s { fill: none; stroke: currentColor; stroke-width: 3; stroke-linecap: square; stroke-linejoin: miter; }

/* Header: masthead + language */
.top { background: #fff; border-bottom: 6px solid #000; }
.strip { display: flex; align-items: center; justify-content: space-between; gap: 8px; background: #000; color: var(--yellow); padding: 6px 16px; font-family: var(--head); font-size: 1rem; text-transform: uppercase; letter-spacing: 0.02em; white-space: nowrap; }
.mast { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 10px 16px 0; }
.brand { display: inline-flex; align-items: center; gap: 6px; min-height: 52px; color: #000; text-decoration: none; font-size: 2rem; line-height: 1; white-space: nowrap; }
.brand b { font-weight: 400; background: var(--red); color: #fff; padding: 4px 8px 3px; }
.mast.cover { display: block; text-align: center; padding-top: 12px; }
.mast.cover .brand { font-size: 68px; gap: 8px; }
.mast.cover .brand b { padding: 4px 10px 2px; }
.tagline { margin: 8px 16px 0; padding: 5px 0; border-top: 3px solid #000; border-bottom: 3px solid #000; text-align: center; font-family: var(--head); font-size: 1rem; text-transform: uppercase; letter-spacing: 0.06em; }
.bigtext { min-height: 48px; padding: 0 12px; border: 3px solid #000; border-radius: 0; background: var(--yellow); color: #000; font-family: var(--head); font-size: 1rem; text-transform: uppercase; letter-spacing: 0.03em; white-space: nowrap; }
.lang { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; margin: 10px 16px 12px; border: 3px solid #000; }
.lang button { min-height: 52px; border: 0; border-left: 3px solid #000; border-radius: 0; background: #fff; color: #000; font: inherit; font-size: 0.95rem; font-weight: 800; padding: 0 2px; }
.lang button:first-child { border-left: 0; }
.lang button[aria-pressed="true"] { background: #000; color: var(--yellow); }

/* Section band: full-width colour block with the page title */
.band { margin: -16px -16px 16px; padding: 14px 16px 12px; background: var(--sec); color: var(--sec-on); border-bottom: 3px solid #000; }
.band h1 { margin: 0; font-size: 3rem; }
.band p { margin: 6px 0 0; font-weight: 700; }
.band .back { color: inherit; }
.hazard { height: 20px; background: var(--stripe); margin: -16px -16px 16px; border-bottom: 3px solid #000; }
.kicker { display: inline-block; background: var(--sec); color: var(--sec-on); font-size: 1rem; letter-spacing: 0.08em; padding: 4px 10px 3px; margin: 0 0 10px; }
.back { display: inline-flex; align-items: center; gap: 6px; min-height: 48px; color: #000; text-decoration: none; font-size: 1.1rem; }

/* Buttons: 64px tall, full width, flat offset shadow */
.btn { display: flex; align-items: center; justify-content: center; gap: 10px; width: calc(100% - 5px); min-height: 64px; padding: 8px 14px; border: 3px solid #000; border-radius: 0; background: var(--red); color: #fff; font-size: 1.35rem; line-height: 1.05; text-decoration: none; margin: 14px 5px 19px 0; box-shadow: 5px 5px 0 #000; cursor: pointer; }
.btn.plain { background: #fff; color: #000; }
.btn.green { background: var(--green); color: #fff; }
.btn.yellow { background: var(--yellow); color: #000; }

/* Tags */
.tag { display: inline-block; background: var(--yellow); color: #000; border: 2px solid #000; font-size: 0.85rem; letter-spacing: 0.06em; padding: 2px 8px 1px; }
.tag.sample { background: #fff; }
.tag.editor { background: #000; color: #fff; }

/* Placeholder photo blocks */
.photo { position: relative; border: 3px solid #000; line-height: 0; margin: 0 0 12px; background: #000; }
.photo svg { display: block; width: 100%; height: auto; }
.photo .ph { position: absolute; right: 0; bottom: 0; background: #000; color: #fff; font: 700 11px/1 Arial, sans-serif; letter-spacing: 0.12em; padding: 4px 6px; }

/* Cards */
.card { display: block; background: #fff; border: 3px solid #000; padding: 14px; margin: 14px 5px 19px 0; box-shadow: 5px 5px 0 #000; color: #000; text-decoration: none; font-weight: 400; }
.card.yellow { background: var(--yellow); }

/* Home: cover story + numbered TODAY list */
.cover-story h2 { font-size: 3.3rem; line-height: 0.92; margin: 10px 0 8px; }
.cover-story .dek { font-size: 1.15rem; font-weight: 700; margin-bottom: 0; }
.today-head { display: flex; align-items: baseline; gap: 10px; border-top: 6px solid #000; padding-top: 8px; margin: 30px 0 0; font-size: 2.4rem; }
.today-head small { font-family: var(--body); font-size: 0.9rem; font-weight: 800; letter-spacing: 0; text-transform: none; }
.today { list-style: none; margin: 0; padding: 0; }
.today a { display: flex; align-items: center; gap: 12px; min-height: 96px; padding: 10px 0; border-bottom: 3px solid #000; color: #000; text-decoration: none; }
.today .num { flex: none; width: 50px; font-family: var(--head); font-size: 3.6rem; line-height: 1; color: var(--red); text-align: center; }
.today .txt { flex: 1; }
.today strong { display: block; font-size: 1.15rem; line-height: 1.2; font-weight: 800; }
.today .meta { display: block; margin-top: 4px; font-family: var(--head); font-size: 0.85rem; letter-spacing: 0.08em; text-transform: uppercase; }
.today .go { flex: none; display: flex; align-items: center; justify-content: center; width: 44px; height: 44px; background: #000; color: #fff; }

/* Article */
.article h1 { font-size: 3.1rem; line-height: 0.92; margin: 6px 0 14px; }
.article p, .article li { font-size: 1.1rem; }
.todo { border: 3px solid #000; margin: 20px 5px 24px 0; box-shadow: 5px 5px 0 #000; background: #fff; }
.todo h2 { display: flex; align-items: center; gap: 10px; margin: 0; padding: 10px 14px 8px; background: var(--red); color: #fff; border-bottom: 3px solid #000; font-size: 1.9rem; }
.todo ol { list-style: none; counter-reset: n; margin: 0; padding: 0; }
.todo li { counter-increment: n; display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-bottom: 3px solid #000; font-weight: 700; line-height: 1.3; }
.todo li:last-child { border-bottom: 0; }
.todo li::before { content: counter(n); flex: none; display: flex; align-items: center; justify-content: center; width: 52px; height: 52px; background: #000; color: var(--yellow); font-family: var(--head); font-size: 2.2rem; line-height: 1; }
.source { border-left: 8px solid #000; padding: 4px 0 4px 12px; margin: 16px 0; font-size: 0.9rem !important; font-weight: 600; }

/* Topics: 6 big tiles, 2 columns */
.tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 16px 12px; padding-right: 5px; }
.tile { position: relative; display: flex; flex-direction: column; align-items: flex-start; justify-content: flex-end; gap: 10px; min-height: 168px; background: #fff; border: 3px solid #000; padding: 12px 10px 10px; color: #000; text-decoration: none; font-family: var(--head); font-weight: 400; font-size: 1.3rem; line-height: 1; text-transform: uppercase; letter-spacing: 0.02em; box-shadow: 5px 5px 0 #000; }
.tile svg.i { width: 56px; height: 56px; }
.tile .n { position: absolute; top: 6px; right: 10px; font-size: 2rem; opacity: 1; }
.tile.red { background: var(--red); color: #fff; }
.tile.yellow { background: var(--yellow); }
.tile.black { background: #000; color: var(--yellow); }

/* Forum: big coloured room tiles */
.rooms { padding-right: 5px; }
.room { display: flex; align-items: stretch; min-height: 116px; margin: 0 0 16px; border: 3px solid #000; box-shadow: 5px 5px 0 #000; background: var(--green); color: #fff; text-decoration: none; font-weight: 400; }
.room .ico { flex: none; display: flex; align-items: center; justify-content: center; width: 68px; border-right: 3px solid #000; background: #000; color: #fff; }
.room .ico svg { width: 40px; height: 40px; }
.room .txt { flex: 1; padding: 10px 10px 10px 12px; align-self: center; }
.room .q { display: block; font-size: 1rem; font-weight: 700; line-height: 1.25; }
.room .count { flex: none; display: flex; flex-direction: column; align-items: center; justify-content: center; width: 76px; border-left: 3px solid #000; background: #fff; color: #000; font-family: var(--head); font-size: 2.1rem; line-height: 1; }
.room .count small { text-transform: uppercase; font-size: 0.8rem; letter-spacing: 0.08em; margin-top: 4px; }
.room.yellow { background: var(--yellow); color: #000; }
.room.hazard-room { background: #000; color: var(--yellow); }
.room.hazard-room .ico { background: var(--stripe); color: #000; }
.room.hazard-room .ico svg { background: var(--yellow); padding: 4px; width: 46px; height: 46px; border: 3px solid #000; }
.room.hazard-room .count { background: var(--yellow); }

/* Room: posts and form */
.post .who { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; padding-bottom: 10px; border-bottom: 3px solid #000; }
.avatar { flex: none; display: flex; align-items: center; justify-content: center; width: 52px; height: 52px; background: var(--green); color: #fff; border: 3px solid #000; }
.avatar svg { width: 30px; height: 30px; }
.post .who strong { font-family: var(--head); font-weight: 400; font-size: 1.25rem; text-transform: uppercase; letter-spacing: 0.02em; }
.post .btn { margin: 12px 5px 5px 0; }
.reply { border-left: 8px solid var(--green); padding-left: 12px; margin-top: 12px; }
label { display: block; font-size: 1.2rem; margin: 16px 0 6px; }
input, textarea { width: 100%; min-height: 64px; padding: 12px; border: 3px solid #000; border-radius: 0; background: #fff; color: #000; font: inherit; }
::placeholder { color: #444; opacity: 1; }
textarea { min-height: 130px; }
.note { display: flex; gap: 10px; align-items: center; background: var(--yellow); border: 3px solid #000; padding: 12px; margin: 16px 0; font-weight: 800; line-height: 1.3; }
.note svg { width: 36px; height: 36px; }

/* Alerts: warning cards with hazard stripe */
.alert { border: 3px solid #000; margin: 0 5px 22px 0; box-shadow: 5px 5px 0 #000; background: #fff; }
.alert .stripe { height: 18px; background: var(--stripe); border-bottom: 3px solid #000; }
.alert .head { display: flex; align-items: center; gap: 10px; padding: 8px 12px 6px; background: #000; color: var(--yellow); font-family: var(--head); font-size: 1.25rem; text-transform: uppercase; letter-spacing: 0.05em; }
.alert .body { padding: 12px 14px 4px; }
.alert h3 { font-size: 1.7rem; line-height: 1; margin-bottom: 8px; }
.alert .body p { font-weight: 600; }
.alert.heat .body { background: var(--yellow); }
.alert .btn { margin-bottom: 14px; }

/* About */
.charter { list-style: none; counter-reset: c; margin: 0; padding: 0; border-top: 3px solid #000; }
.charter li { counter-increment: c; display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 3px solid #000; font-weight: 700; line-height: 1.3; }
.charter li::before { content: counter(c); flex: none; width: 40px; font-family: var(--head); font-size: 2.8rem; line-height: 1; color: var(--red); text-align: center; }

/* Footer */
footer { margin: 8px 16px 0; padding: 12px 0 24px; border-top: 6px solid #000; text-align: center; font-size: 0.8rem; font-weight: 600; }
footer p { margin-bottom: 8px; }

/* Sticky bottom tabs: 3 big tabs, one colour each */
.tabs { position: fixed; bottom: 0; left: 0; right: 0; margin: 0 auto; width: 100%; max-width: 390px; display: grid; grid-template-columns: repeat(3, 1fr); background: #fff; border-top: 3px solid #000; }
.tabs a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-height: 84px; color: #000; text-decoration: none; font-size: 1.2rem; letter-spacing: 0.06em; border-top: 10px solid var(--red); border-left: 3px solid #000; background: #fff; }
.tabs a:first-child { border-left: 0; }
.tabs a svg { width: 34px; height: 34px; }
.tabs a.t-talk { border-top-color: var(--green); }
.tabs a.t-alerts { border-top: 0; padding-top: 10px; background: var(--stripe) top / 100% 10px no-repeat, #fff; }
.tabs a.t-read[aria-current="page"] { background: var(--red); color: #fff; }
.tabs a.t-talk[aria-current="page"] { background: var(--green); color: #fff; }
.tabs a.t-alerts[aria-current="page"] { background: var(--stripe) top / 100% 10px no-repeat, #000; color: var(--yellow); }

/* ------------------------------------------------------------------
   Site additions (not in the mockups)
   ------------------------------------------------------------------ */
[hidden] { display: none !important; }
:focus-visible { outline: 4px solid #000; outline-offset: 3px; }
h1, h2, h3, .today strong, .post p { overflow-wrap: break-word; word-wrap: break-word; }

/* Tap targets: at least 56px */
.brand, .back, .bigtext { min-height: 56px; }
.lang a { display: flex; align-items: center; justify-content: center; min-height: 56px; border-left: 3px solid #000; background: #fff; color: #000; font-size: 0.95rem; font-weight: 800; text-decoration: none; padding: 0 2px; }
.lang a:first-child { border-left: 0; }
.lang a[aria-current="true"] { background: #000; color: var(--yellow); }
footer a, .source a, a.inline-tap { display: inline-flex; align-items: center; min-height: 56px; }
.strip { min-height: 68px; }
.strip .bigtext { flex: none; }
.strip .when { line-height: 1.15; white-space: normal; }

/* Messages */
.note.bad { background: var(--red); color: #fff; }
.note.ok { background: var(--green); color: #fff; }
.note.quiet { background: #fff; font-size: 0.9rem; }
.post p.text { white-space: pre-wrap; }
.post .muted { font-weight: 600; }
.rooms h3 { margin-bottom: 4px; }
.alert .when { margin-left: auto; white-space: nowrap; }
.today-head.first { border-top: 0; margin-top: 0; }

/* Chinese and Tamil have no condensed headline font: use heavy weight and more line height */
html[data-lang="zh"] h1, html[data-lang="zh"] h2, html[data-lang="zh"] h3, html[data-lang="zh"] .btn, html[data-lang="zh"] .tabs a, html[data-lang="zh"] .kicker,
html[data-lang="zh"] .tag, html[data-lang="zh"] label, html[data-lang="zh"] .back, html[data-lang="zh"] .tile, html[data-lang="zh"] .tagline, html[data-lang="zh"] .strip, html[data-lang="zh"] .bigtext,
html[data-lang="zh"] .today .meta, html[data-lang="zh"] .alert .head, html[data-lang="zh"] .room .count small,
html[data-lang="ta"] h1, html[data-lang="ta"] h2, html[data-lang="ta"] h3, html[data-lang="ta"] .btn, html[data-lang="ta"] .tabs a, html[data-lang="ta"] .kicker,
html[data-lang="ta"] .tag, html[data-lang="ta"] label, html[data-lang="ta"] .back, html[data-lang="ta"] .tile, html[data-lang="ta"] .tagline, html[data-lang="ta"] .strip, html[data-lang="ta"] .bigtext,
html[data-lang="ta"] .today .meta, html[data-lang="ta"] .alert .head, html[data-lang="ta"] .room .count small {
  font-family: var(--body); font-weight: 900; letter-spacing: 0;
}
html[data-lang="zh"] h1, html[data-lang="zh"] .article h1 { font-size: 2.3rem; line-height: 1.15; }
html[data-lang="zh"] .band h1 { font-size: 2.5rem; }
html[data-lang="zh"] .cover-story h2 { font-size: 2.4rem; line-height: 1.15; }
html[data-lang="zh"] h2 { line-height: 1.2; }
html[data-lang="zh"] h3, html[data-lang="zh"] .tile { line-height: 1.25; }
html[data-lang="ta"] h1, html[data-lang="ta"] .article h1, html[data-lang="ta"] .band h1 { font-size: 1.6rem; line-height: 1.3; }
html[data-lang="ta"] .cover-story h2 { font-size: 1.7rem; line-height: 1.3; }
html[data-lang="ta"] h2, html[data-lang="ta"] .todo h2 { font-size: 1.35rem; line-height: 1.3; }
html[data-lang="ta"] .today-head { font-size: 1.6rem; flex-wrap: wrap; }
html[data-lang="ta"] h3, html[data-lang="ta"] .alert h3 { font-size: 1.15rem; line-height: 1.35; }
html[data-lang="ta"] .btn { font-size: 1.05rem; line-height: 1.3; }
html[data-lang="ta"] .tile { font-size: 0.95rem; line-height: 1.3; }
html[data-lang="ta"] .tabs a { font-size: 0.8rem; }
html[data-lang="ta"] .tagline, html[data-lang="ta"] .strip, html[data-lang="ta"] .bigtext, html[data-lang="ta"] .kicker, html[data-lang="ta"] .alert .head { font-size: 0.8rem; }
html[data-lang="ta"] label { font-size: 1rem; }
html[data-lang="ta"] .room .count small, html[data-lang="ms"] .room .count small { font-size: 0.6rem; letter-spacing: 0; }
html[data-lang="ta"] .strip, html[data-lang="ms"] .strip { white-space: normal; }
html[data-lang="ms"] .band h1 { font-size: 2.6rem; }
html[data-lang="ms"] .tile { font-size: 1.15rem; }

/* Moderator page */
.modtabs { display: grid; grid-template-columns: 1fr 1fr; gap: 0; border: 3px solid #000; margin: 0 0 16px; }
.modtabs button { min-height: 56px; border: 0; border-radius: 0; background: #fff; color: #000; font-family: var(--head); font-size: 1.1rem; text-transform: uppercase; letter-spacing: 0.03em; box-shadow: inset -3px -3px 0 #000; }
.modtabs button[aria-pressed="true"] { background: #000; color: var(--yellow); }
.modrow { display: grid; grid-template-columns: 1fr 1fr; gap: 0 8px; }
.modrow .btn { font-size: 1.1rem; margin-bottom: 8px; }
.replist { margin: 8px 0 0; padding: 8px 0 0 18px; border-top: 3px solid #000; font-size: 0.85rem; font-weight: 600; }
