:root {
  --bg: #f5f3ee;
  --card: #fffefb;
  --ink: #16181b;
  --muted: #6d7178;
  --line: #e3dfd6;
  --soft: #ece9e1;
  --ok: #0c9a68;
  --ok-soft: #cfeadf;
  --down: #d5432a;
  --down-soft: #f8ddd6;
  --wait: #b3791a;
  --shadow: 0 1px 2px rgb(20 20 20 / 0.04), 0 8px 24px rgb(20 20 20 / 0.05);
  --serif: ui-serif, 'Iowan Old Style', 'Palatino Linotype', Georgia, serif;
  --sans: system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --mono: ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0d0f11;
    --card: #15181b;
    --ink: #ecebe6;
    --muted: #8d9299;
    --line: #272b30;
    --soft: #1d2125;
    --ok: #2fd197;
    --ok-soft: #173a2e;
    --down: #ff6b4f;
    --down-soft: #45211a;
    --wait: #e0a941;
    --shadow: 0 1px 2px rgb(0 0 0 / 0.3), 0 12px 32px rgb(0 0 0 / 0.35);
  }
}

* {
  box-sizing: border-box;
}
[hidden] {
  display: none !important;
}
html {
  -webkit-text-size-adjust: 100%;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 15px/1.5 var(--sans);
  font-variant-numeric: tabular-nums;
  -webkit-font-smoothing: antialiased;
}
button,
input,
textarea {
  font: inherit;
  color: inherit;
}
button {
  cursor: pointer;
}
:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 2px;
  border-radius: 6px;
}
code,
pre {
  font-family: var(--mono);
}

/* ---------------------------------------------------------------- parçalar */

.btn {
  border: 1px solid var(--line);
  background: var(--card);
  border-radius: 999px;
  padding: 7px 14px;
  font-size: 14px;
  white-space: nowrap;
  transition: border-color 0.15s, background 0.15s, transform 0.05s;
}
.btn:hover {
  border-color: var(--muted);
}
.btn:active {
  transform: translateY(1px);
}
.btn.primary {
  background: var(--ink);
  color: var(--bg);
  border-color: var(--ink);
}
.btn.ghost {
  border-color: transparent;
  background: transparent;
  color: var(--muted);
}
.btn.ghost:hover {
  color: var(--ink);
  background: var(--soft);
}
.btn.danger {
  color: var(--down);
}
.btn.danger.armed {
  background: var(--down);
  border-color: var(--down);
  color: #fff;
}
.btn[disabled] {
  opacity: 0.5;
  cursor: default;
}

.field {
  display: block;
}
.field > span {
  display: block;
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 4px;
}
.field input,
.field textarea {
  width: 100%;
  border: 1px solid var(--line);
  background: var(--card);
  border-radius: 10px;
  padding: 9px 11px;
}
.field textarea {
  resize: vertical;
  min-height: 70px;
}
.field input:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--ink);
}

.dot {
  position: relative;
  flex: none;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--muted);
}
.dot::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: inherit;
  opacity: 0;
}
.is-up .dot {
  background: var(--ok);
}
.is-down .dot {
  background: var(--down);
}
.is-waiting .dot {
  background: transparent;
  box-shadow: inset 0 0 0 2px var(--wait);
}
.dot.beat::after {
  animation: ripple 1.1s ease-out;
}
@keyframes ripple {
  from {
    opacity: 0.55;
    transform: scale(1);
  }
  to {
    opacity: 0;
    transform: scale(3.6);
  }
}

/* ------------------------------------------------------------------ giriş */

.auth {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1.1fr 1fr;
}
.auth-story {
  padding: 56px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 40px;
  border-right: 1px solid var(--line);
  overflow: hidden;
}
.auth-story h1 {
  font: 500 clamp(36px, 4.6vw, 62px) / 1.05 var(--serif);
  letter-spacing: -0.02em;
  margin: 0 0 18px;
}
.auth-story p {
  color: var(--muted);
  max-width: 44ch;
  font-size: 17px;
  margin: 0;
}
.promises {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 10px;
  color: var(--muted);
  font-size: 14px;
}
.promises b {
  color: var(--ink);
  font-weight: 600;
}
.auth-form {
  display: grid;
  place-items: center;
  padding: 40px 24px;
}
.auth-form form {
  width: min(360px, 100%);
  display: grid;
  gap: 14px;
}
.auth-form h2 {
  font: 500 28px var(--serif);
  margin: 0 0 6px;
}
.auth-form .switch {
  color: var(--muted);
  font-size: 14px;
  text-align: center;
}
.linkish {
  background: none;
  border: 0;
  padding: 0;
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.error {
  color: var(--down);
  font-size: 14px;
  min-height: 21px;
  margin: 0;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font: 600 19px var(--serif);
  letter-spacing: -0.01em;
}
.brand .dot {
  background: var(--ok);
}

/* radar: "dinliyorum" */
.radar {
  position: relative;
  width: 132px;
  height: 132px;
  flex: none;
}
.radar i {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 1.5px solid var(--ok);
  opacity: 0;
  animation: listen 3.6s ease-out infinite;
}
.radar i:nth-child(2) {
  animation-delay: 1.2s;
}
.radar i:nth-child(3) {
  animation-delay: 2.4s;
}
.radar b {
  position: absolute;
  inset: 50%;
  width: 12px;
  height: 12px;
  margin: -6px;
  border-radius: 50%;
  background: var(--ok);
}
@keyframes listen {
  from {
    transform: scale(0.1);
    opacity: 0.9;
  }
  to {
    transform: scale(1);
    opacity: 0;
  }
}

/* ------------------------------------------------------------------ panel */

.shell {
  max-width: 1240px;
  margin: 0 auto;
  padding: 20px 28px 80px;
}
.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.top .who {
  font-size: 14px;
  min-width: 0;
  max-width: 60%;
}
.top .who span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
}

.lang {
  appearance: none;
  -webkit-appearance: none;
  border: 1px solid var(--line);
  background: var(--card)
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%23888' stroke-width='1.5'/%3E%3C/svg%3E")
    no-repeat right 12px center / 10px;
  border-radius: 999px;
  padding: 7px 32px 7px 14px;
  font: inherit;
  font-size: 14px;
  color: inherit;
  cursor: pointer;
}
.lang:hover {
  border-color: var(--muted);
}
.drawer .lang {
  width: 100%;
  border-radius: 10px;
  padding: 10px 34px 10px 12px;
  font-size: 15px;
}
.auth-form {
  position: relative;
}
.auth-lang {
  position: absolute;
  top: 24px;
  right: 24px;
}
.note.hint {
  font-size: 13px;
  margin-top: 8px;
}
.row.spaced {
  margin-top: 28px;
}
.row.spaced p {
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
}

.hero {
  padding: 52px 0 26px;
}
.hero h1 {
  font: 500 clamp(40px, 6.4vw, 84px) / 1 var(--serif);
  letter-spacing: -0.025em;
  margin: 0;
}
.hero.is-down h1 em {
  font-style: normal;
  color: var(--down);
}
.hero.is-up h1 em {
  font-style: normal;
  color: var(--ok);
}
.hero p {
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 17px;
}

.address {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  padding: 10px 10px 10px 16px;
  border: 1px solid var(--line);
  background: var(--card);
  border-radius: 16px;
  box-shadow: var(--shadow);
}
.address small {
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.address code {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 14px;
}

.toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin: 34px 0 16px;
}
.chips {
  display: flex;
  gap: 4px;
  background: var(--soft);
  border-radius: 999px;
  padding: 3px;
}
.chip {
  border: 0;
  background: transparent;
  border-radius: 999px;
  padding: 5px 12px;
  font-size: 13px;
  color: var(--muted);
}
.chip b {
  font-weight: 600;
  margin-left: 4px;
}
.chip[aria-pressed='true'] {
  background: var(--card);
  color: var(--ink);
  box-shadow: 0 1px 2px rgb(0 0 0 / 0.08);
}
.search {
  flex: 1;
  min-width: 180px;
  border: 1px solid var(--line);
  background: var(--card);
  border-radius: 999px;
  padding: 7px 14px;
}
.search:focus {
  outline: none;
  border-color: var(--ink);
}

.wall {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
  gap: 12px;
}
.tile {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 14px 16px 12px;
  display: grid;
  gap: 10px;
  cursor: pointer;
  transition: border-color 0.15s, transform 0.15s, box-shadow 0.15s;
}
.tile:hover {
  border-color: var(--muted);
  transform: translateY(-1px);
  box-shadow: var(--shadow);
}
.tile header {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.tile h3 {
  flex: 1;
  margin: 0;
  font-size: 15px;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.tile .id {
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 0.03em;
}
.tile .meta {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  min-height: 20px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.tile .claim {
  width: 100%;
  border: 1px dashed var(--wait);
  background: transparent;
  border-radius: 9px;
  padding: 5px 9px;
  font-size: 13px;
}
.tile .claim:focus {
  outline: none;
  border-style: solid;
  border-color: var(--ink);
}
.tile footer {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  color: var(--muted);
}
.tile.is-down {
  border-color: var(--down);
  background: linear-gradient(var(--down-soft), var(--down-soft)) top / 100% 3px no-repeat, var(--card);
}
.tile.is-down .when {
  color: var(--down);
  font-weight: 600;
}
.tile.is-new h3 {
  color: var(--wait);
}

.strip {
  position: relative;
  height: 8px;
  border-radius: 4px;
  background: var(--ok-soft);
  overflow: hidden;
}
.strip.big {
  height: 22px;
  border-radius: 7px;
}
.strip i {
  position: absolute;
  top: 0;
  bottom: 0;
  min-width: 2px;
}
.strip .gap {
  background: var(--down);
}
.strip .nodata {
  background: var(--soft);
}
.strip-axis {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: var(--muted);
  margin-top: 4px;
}

.empty {
  color: var(--muted);
  padding: 40px 0;
  text-align: center;
}

/* ilk kurulum */
.onboard {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 36px;
  align-items: center;
  margin-top: 34px;
  padding: 34px;
  border: 1px dashed var(--line);
  border-radius: 20px;
}
.onboard ol {
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: step;
  display: grid;
  gap: 14px;
}
.onboard li {
  counter-increment: step;
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: 12px;
}
.onboard li::before {
  content: counter(step);
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--soft);
  font-size: 13px;
  font-weight: 600;
}
.onboard li p {
  margin: 0;
  color: var(--muted);
}
.onboard li strong {
  display: block;
  color: var(--ink);
}

.oneway {
  margin-top: 48px;
  color: var(--muted);
  font-size: 13px;
  text-align: center;
}

/* ----------------------------------------------------------------- çekmece */

.scrim {
  position: fixed;
  inset: 0;
  background: rgb(10 10 10 / 0.38);
  animation: fade 0.18s ease-out;
  z-index: 10;
}
.drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(520px, 100vw);
  background: var(--bg);
  border-left: 1px solid var(--line);
  overflow-y: auto;
  padding: 22px 26px 60px;
  animation: slide 0.22s cubic-bezier(0.2, 0.8, 0.2, 1);
  z-index: 11;
}
@keyframes fade {
  from {
    opacity: 0;
  }
}
@keyframes slide {
  from {
    transform: translateX(40px);
    opacity: 0;
  }
}
.drawer-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}
.drawer h2 {
  font: 500 30px/1.15 var(--serif);
  letter-spacing: -0.01em;
  margin: 6px 0 4px;
  overflow-wrap: anywhere;
}
.drawer h4 {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  font-weight: 600;
  margin: 30px 0 10px;
}
.statusline {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 15px;
}
.is-down .statusline {
  color: var(--down);
  font-weight: 600;
}
.facts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  margin-top: 16px;
}
.facts div {
  background: var(--card);
  padding: 10px 12px;
  min-width: 0;
}
.facts dt {
  font-size: 11px;
  color: var(--muted);
}
.facts dd {
  margin: 2px 0 0;
  font-size: 14px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.form .wide {
  grid-column: 1 / -1;
}
.saved {
  font-size: 12px;
  color: var(--ok);
  margin-left: 8px;
  text-transform: none;
  letter-spacing: 0;
  font-weight: 500;
}
.note {
  color: var(--muted);
  font-size: 14px;
  margin: 0 0 10px;
}
.note.warn {
  border-left: 3px solid var(--wait);
  padding-left: 10px;
}
.code {
  position: relative;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
}
.code pre {
  margin: 0;
  padding: 14px;
  font-size: 12.5px;
  line-height: 1.55;
  overflow-x: auto;
}
.code .btn {
  position: absolute;
  top: 8px;
  right: 8px;
  padding: 4px 10px;
  font-size: 12px;
}
.tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 8px;
}
.events {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
  font-size: 14px;
}
.events li {
  display: grid;
  grid-template-columns: 10px 1fr auto;
  gap: 10px;
  align-items: center;
}
.events time {
  color: var(--muted);
  font-size: 13px;
}
.row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 0;
  border-top: 1px solid var(--line);
}
.row p {
  margin: 0;
  font-size: 14px;
}
.row small {
  color: var(--muted);
  display: block;
}
.inline-form {
  display: flex;
  gap: 8px;
  margin-top: 10px;
}
.inline-form input {
  flex: 1;
  min-width: 0;
  border: 1px solid var(--line);
  background: var(--card);
  border-radius: 999px;
  padding: 7px 14px;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  transform: translateX(-50%);
  background: var(--ink);
  color: var(--bg);
  padding: 9px 16px;
  border-radius: 999px;
  font-size: 14px;
  z-index: 20;
  animation: fade 0.15s;
}

@media (max-width: 760px) {
  .auth {
    grid-template-columns: 1fr;
  }
  .auth-story {
    padding: 28px 24px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
  .auth-story .radar,
  .promises {
    display: none;
  }
  .shell {
    padding: 16px 16px 60px;
  }
  .hero {
    padding: 34px 0 20px;
  }
  .address code {
    flex-basis: 100%;
    order: -1;
    padding-top: 4px;
  }
  .address small {
    display: none;
  }
  .address .btn {
    flex: 1;
  }
  .chips {
    max-width: 100%;
    overflow-x: auto;
  }
  .chip {
    padding: 5px 9px;
    white-space: nowrap;
  }
  .onboard {
    grid-template-columns: 1fr;
    padding: 22px;
  }
  .form {
    grid-template-columns: 1fr;
  }
}

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