/* ROB RUN Türkiye: Apple-style interface. System fonts, grouped surfaces, one accent,
   translucent "glass" only on the navigation layer (content stays opaque and readable). */
:root {
  --bg: #f5f5f7;
  --surface: #ffffff;
  --surface-2: #ececf0;
  --hover: #f2f2f5;
  --text: #1d1d1f;
  --muted: #66666b;
  --line: rgba(60, 60, 67, .14);
  --field-line: rgba(60, 60, 67, .30);
  --accent: #0071e3;
  --accent-press: #0062c4;
  --link: #0062c4;
  --danger: #c4001a;
  --warn: #8f4000;
  --glass: rgba(249, 249, 251, .74);
  --glow-a: rgba(0, 113, 227, .16);
  --glow-b: rgba(175, 82, 222, .12);
  --shadow: 0 1px 2px rgba(0, 0, 0, .04), 0 10px 30px rgba(0, 0, 0, .05);
  --shadow-pop: 0 2px 6px rgba(0, 0, 0, .08), 0 20px 48px rgba(0, 0, 0, .18);
  --radius: 20px;
  --radius-sm: 12px;
  --ease: cubic-bezier(.32, .72, 0, 1);
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #000000;
    --surface: #1c1c1e;
    --surface-2: #2c2c2e;
    --hover: #262628;
    --text: #f5f5f7;
    --muted: #a1a1a6;
    --line: rgba(120, 120, 128, .32);
    --field-line: rgba(150, 150, 158, .46);
    --accent: #0071e3;
    --accent-press: #0a84ff;
    --link: #5cadff;
    --danger: #ff6961;
    --warn: #ffb340;
    --glass: rgba(22, 22, 24, .72);
    --glow-a: rgba(10, 132, 255, .24);
    --glow-b: rgba(191, 90, 242, .18);
    --shadow: none;
    --shadow-pop: 0 20px 48px rgba(0, 0, 0, .6);
  }
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 88px; }
body {
  background: var(--bg);
  color: var(--text);
  font: 400 1.0625rem/1.5 -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI Variable Text", "Segoe UI", Inter, Roboto, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}
h1, h2 { line-height: 1.15; text-wrap: balance; overflow-wrap: anywhere; }
h1 { font-size: clamp(1.75rem, 4.5vw, 2.25rem); font-weight: 700; letter-spacing: -.021em; }
h2 { font-size: 1.25rem; font-weight: 650; letter-spacing: -.012em; }
a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }
ul.group, ul.cards { list-style: none; }
img, svg { display: block; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
.wrap { width: 100%; max-width: 920px; margin: 0 auto; padding-inline: max(16px, env(safe-area-inset-left)); }
main { flex: 1; padding-bottom: 64px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 30; background: var(--surface); padding: 10px 16px; border-radius: var(--radius-sm); }
.skip:focus { top: 12px; }
.center { text-align: center; justify-content: center; }
.meta { color: var(--muted); font-size: .875rem; }
.icon { width: 1.25em; height: 1.25em; flex: none; }

/* ---------- navigation ---------- */
.nav {
  position: sticky; top: 0; z-index: 20;
  background: var(--glass);
  -webkit-backdrop-filter: saturate(180%) blur(22px);
  backdrop-filter: saturate(180%) blur(22px);
  border-bottom: 1px solid var(--line);
  padding-top: env(safe-area-inset-top);
}
.nav-row { display: flex; align-items: center; gap: 14px; min-height: 60px; }
.brand { display: flex; align-items: center; gap: 9px; color: var(--text); font-weight: 650; letter-spacing: -.012em; white-space: nowrap; }
.brand:hover { text-decoration: none; }
.brand b { font-weight: 400; color: var(--muted); }
.search { flex: 1; max-width: 340px; margin-left: auto; position: relative; }
.search .icon { position: absolute; left: 12px; top: 50%; translate: 0 -50%; color: var(--muted); pointer-events: none; }
.search input { min-height: 38px; padding: 6px 14px 6px 38px; border-radius: 999px; background: var(--surface-2); border-color: transparent; }
.nav-actions { display: flex; align-items: center; gap: 8px; }

.menu { position: relative; }
.menu summary { list-style: none; cursor: pointer; border-radius: 50%; padding: 4px; }
.menu summary::-webkit-details-marker { display: none; }
.menu-panel {
  position: absolute; right: 0; top: calc(100% + 8px); min-width: 210px; padding: 6px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow-pop);
  animation: pop .22s var(--ease); transform-origin: top right;
}
@keyframes pop { from { opacity: 0; scale: .94; } }
.menu-name { padding: 8px 12px; color: var(--muted); font-size: .8125rem; border-bottom: 1px solid var(--line); margin-bottom: 4px; }
.menu-panel a, .menu-panel button {
  display: flex; align-items: center; justify-content: space-between; gap: 8px; width: 100%; min-height: 40px; padding: 8px 12px;
  border: 0; border-radius: 10px; background: none; color: var(--text); font: inherit; font-size: .9375rem; text-align: left; cursor: pointer;
}
.menu-panel a:hover, .menu-panel button:hover { background: var(--hover); text-decoration: none; }

/* ---------- buttons and fields ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 44px; padding: 10px 22px;
  border: 0; border-radius: 999px; font: inherit; font-size: 1rem; font-weight: 550; cursor: pointer; white-space: nowrap;
  transition: background-color .18s ease, scale .18s var(--ease);
}
.btn:hover { text-decoration: none; }
.btn:active { scale: .97; }
.btn-sm { min-height: 36px; padding: 6px 15px; font-size: .9rem; }
.btn-block { width: 100%; }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-press); }
.btn-quiet { background: var(--surface-2); color: var(--text); }
.btn-quiet:hover { filter: brightness(.97); }

/* :where() keeps specificity low so .search and .modbar can override. */
input:where(:not([type=checkbox], [type=hidden])), select, textarea {
  width: 100%; min-height: 44px; padding: 10px 14px; font: inherit; color: var(--text);
  background: var(--surface); border: 1px solid var(--field-line); border-radius: var(--radius-sm);
  transition: border-color .18s ease, box-shadow .18s ease;
}
.search input:focus, input:focus, select:focus, textarea:focus { outline: 0; border-color: var(--accent); box-shadow: 0 0 0 4px var(--glow-a); }
textarea { resize: vertical; min-height: 150px; line-height: 1.55; }

.group { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); }
.form { padding: clamp(20px, 4vw, 32px); margin-top: 24px; }
.form-narrow { max-width: 440px; margin-inline: auto; margin-top: 40px; }
.form-narrow h1 { text-align: center; }
.form > h1 + .meta { text-align: center; margin-top: 6px; }
.field { display: block; margin-top: 18px; }
.field > span { display: block; font-size: .9rem; font-weight: 600; margin-bottom: 6px; }
.field small { display: block; margin-top: 6px; color: var(--muted); font-size: .8125rem; }
.check { display: flex; gap: 10px; align-items: flex-start; margin-top: 18px; font-size: .9375rem; }
.check input { width: 20px; height: 20px; margin-top: 2px; accent-color: var(--accent); flex: none; }
.hp { position: absolute; left: -10000px; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }
.form-narrow .meta.center { margin-top: 16px; }

.notice { margin-top: 18px; padding: 12px 16px; border-radius: var(--radius-sm); background: var(--surface); border: 1px solid var(--line); }
.notice-error { color: var(--danger); border-color: currentColor; }

.badge { display: inline-flex; align-items: center; gap: 4px; padding: 2px 9px; margin-right: 6px; border-radius: 999px; background: var(--surface-2); color: var(--muted); font-size: .75rem; font-weight: 600; vertical-align: middle; }
.badge-accent { color: var(--link); }
.badge-warn { color: var(--warn); }

/* ---------- home ---------- */
.hero { position: relative; isolation: isolate; text-align: center; padding: clamp(44px, 9vw, 84px) 0 clamp(20px, 5vw, 40px); }
.hero::before {
  content: ""; position: absolute; inset: 0 0 -40px; z-index: -1; pointer-events: none;
  background: radial-gradient(46% 62% at 34% 46%, var(--glow-a), transparent 70%), radial-gradient(42% 58% at 68% 52%, var(--glow-b), transparent 70%);
}
.hero h1 { font-size: clamp(2.25rem, 7.5vw, 3.5rem); letter-spacing: -.028em; }
.hero p { margin-top: 12px; color: var(--muted); font-size: clamp(1.0625rem, 2.6vw, 1.3125rem); text-wrap: balance; }
.hero .actions { justify-content: center; }
.hero .stat { font-size: .875rem; }
.section-title { margin: 36px 4px 12px; }

.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 330px), 1fr)); gap: 14px; }
.card { display: flex; gap: 14px; height: 100%; padding: 18px; background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); color: var(--text); transition: translate .25s var(--ease), background-color .18s ease; }
.card:hover { text-decoration: none; background: var(--hover); translate: 0 -2px; }
.card-text { display: flex; flex-direction: column; min-width: 0; }
.card-text strong { font-weight: 620; letter-spacing: -.008em; }
.card-text > span { color: var(--muted); font-size: .9375rem; line-height: 1.4; margin-top: 2px; }
.card-text small { margin-top: auto; padding-top: 8px; color: var(--muted); font-size: .8125rem; }

.tile { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 13px; color: #fff; flex: none; font-size: 1.25rem; }
.tile-megaphone { background: linear-gradient(160deg, #ff6b5e, #d70015); }
.tile-chat { background: linear-gradient(160deg, #3ea0ff, #0062c4); }
.tile-book { background: linear-gradient(160deg, #ffaa33, #c85a00); }
.tile-wrench { background: linear-gradient(160deg, #8e8e93, #4a4a4f); }
.tile-people { background: linear-gradient(160deg, #3ccf6e, #157f3b); }
.tile-bulb { background: linear-gradient(160deg, #bf7af0, #7b2fbf); }

/* ---------- lists ---------- */
.list { overflow: hidden; }
.list li + li .row::before { content: ""; position: absolute; top: 0; left: 70px; right: 0; height: 1px; background: var(--line); }
.row { position: relative; display: flex; align-items: center; gap: 14px; min-height: 68px; padding: 12px 16px; color: var(--text); }
.row:hover { background: var(--hover); text-decoration: none; }
.row:focus-visible { outline-offset: -3px; }
.row-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.row-title { font-weight: 560; line-height: 1.35; overflow-wrap: anywhere; }
.row-sub { color: var(--muted); font-size: .8125rem; margin-top: 2px; }
.row > .icon { color: var(--muted); opacity: .55; }
.flag { display: inline-block; vertical-align: -.15em; margin-right: 4px; color: var(--warn); }
.flag .icon { width: 1em; height: 1em; }
.count { min-width: 34px; padding: 2px 9px; border-radius: 999px; background: var(--surface-2); color: var(--muted); font-size: .8125rem; font-weight: 600; text-align: center; font-variant-numeric: tabular-nums; }

.avatar { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; color: #fff; font-weight: 650; font-size: 1rem; flex: none; }
.avatar-lg { width: 88px; height: 88px; font-size: 2.25rem; margin: 0 auto 12px; }
.menu .avatar { width: 32px; height: 32px; font-size: .875rem; }
.tone-0 { background: linear-gradient(160deg, #3d8bef, #1c55ae); }
.tone-1 { background: linear-gradient(160deg, #8c6ae6, #5233a8); }
.tone-2 { background: linear-gradient(160deg, #d0599f, #962a6c); }
.tone-3 { background: linear-gradient(160deg, #e2605a, #a82a2a); }
.tone-4 { background: linear-gradient(160deg, #cf7a22, #8f4c00); }
.tone-5 { background: linear-gradient(160deg, #2f9e5b, #136237); }
.tone-6 { background: linear-gradient(160deg, #1f98a3, #0c5f6b); }
.tone-7 { background: linear-gradient(160deg, #75808f, #454d59); }

.empty { text-align: center; padding: 40px 24px; margin-top: 16px; }
.empty p { margin-top: 8px; color: var(--muted); }
.empty .actions { justify-content: center; }
.section-title + .empty { margin-top: 0; }

/* ---------- category, topic, profile ---------- */
.crumbs { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 20px; font-size: .875rem; }
.crumbs > * + *::before { content: "›"; margin-right: 8px; color: var(--muted); }
.crumbs span { color: var(--muted); }
.page-head { display: flex; align-items: center; gap: 16px; margin: 20px 0; }
.page-head > div { flex: 1; min-width: 0; }
.page-head p { color: var(--muted); margin-top: 2px; }
.topic-head { margin: 18px 0; }
.topic-head .meta { margin-top: 8px; }
.topic-head .badge .icon { width: 1em; height: 1em; }
.modbar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 14px; }
.modbar select { width: auto; min-height: 36px; padding: 4px 10px; font-size: .9rem; }

.post { padding: clamp(16px, 3vw, 22px); margin-bottom: 12px; }
.post:target { box-shadow: 0 0 0 3px var(--accent); }
.post-head { display: flex; gap: 12px; align-items: center; }
.author { color: var(--text); font-weight: 620; margin-right: 4px; }
.prose { margin-top: 14px; overflow-wrap: anywhere; }
.prose p + p, .prose p + blockquote, .prose blockquote + p, .prose ol + p { margin-top: 12px; }
.prose h2 { margin: 24px 0 6px; font-size: 1.0625rem; }
.prose ol { padding-left: 22px; margin-top: 16px; }
.prose li + li { margin-top: 8px; }
blockquote { margin-top: 8px; padding: 8px 14px; border-left: 3px solid var(--accent); border-radius: 0 10px 10px 0; background: var(--bg); color: var(--muted); font-size: .9375rem; overflow-wrap: anywhere; }
.post-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 18px; margin-top: 14px; padding-top: 6px; border-top: 1px solid var(--line); font-size: .875rem; }
.post-actions > a, .post-actions summary, .link { display: inline-flex; align-items: center; min-height: 36px; color: var(--muted); }
.link { border: 0; background: none; font: inherit; cursor: pointer; padding: 0; }
.link:hover, .post-actions summary:hover { text-decoration: underline; }
.link.danger { color: var(--danger); }
.report summary { cursor: pointer; list-style: none; }
.report summary::-webkit-details-marker { display: none; }
.report[open] { flex-basis: 100%; }
.report form { display: flex; gap: 8px; padding: 4px 0; }

.profile { text-align: center; padding: 36px 0 20px; }
.profile p { margin-top: 8px; }

.searchbox { display: flex; gap: 10px; margin-bottom: 18px; }

.pager { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 6px; margin: 20px 0; }
.pager a { display: grid; place-items: center; min-width: 40px; min-height: 40px; padding: 0 12px; border-radius: 999px; background: var(--surface); color: var(--text); font-size: .9375rem; }
.pager a:hover { background: var(--hover); text-decoration: none; }
.pager a[aria-current] { background: var(--accent); color: #fff; }

.footer { border-top: 1px solid var(--line); padding: 24px 0 calc(28px + env(safe-area-inset-bottom)); color: var(--muted); font-size: .8125rem; text-align: center; }
.footer a { margin: 0 10px; }
.footer p + p { margin-top: 10px; }

/* ---------- small screens ---------- */
@media (max-width: 680px) {
  .nav-row { flex-wrap: wrap; gap: 8px; padding-block: 10px; }
  .brand b { display: none; }
  .nav-actions { margin-left: auto; }
  .search { order: 3; flex-basis: 100%; max-width: none; }
  .search input { min-height: 40px; }
  html { scroll-padding-top: 130px; }
  .new-topic span { display: none; }
  .new-topic { width: 38px; min-height: 38px !important; padding: 0 !important; }
  .page-head { flex-wrap: wrap; }
  .page-head .btn { width: 100%; }
  .row { gap: 10px; padding-inline: 12px; }
  .list li + li .row::before { left: 62px; }
  .row > .icon { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
@media (prefers-reduced-transparency: reduce) {
  .nav { background: var(--surface); -webkit-backdrop-filter: none; backdrop-filter: none; }
}
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .nav { background: var(--surface); }
}
