/* NSU Reviews — shared styles. White, dark text, blue accents. Clean and light. */

:root {
  --blue: #0b4ea2;
  --blue-dark: #083b7b;
  --blue-tint: #eef3fb;      /* light tint of the same blue */
  --text: #1d232b;
  --muted: #667085;
  --line: #e4e8ee;
  --soft: #f5f7fa;
  --error: #b3261e;
  --radius: 12px;
  --radius-sm: 10px;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font: 16px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: var(--text);
  background: #fff;
  -webkit-font-smoothing: antialiased;
}
body.modal-open { overflow: hidden; }

a { color: var(--blue); }
h1 { font-size: 1.75rem; font-weight: 700; letter-spacing: -0.02em; line-height: 1.2; margin: 0.2em 0 0.1em; }
h2 { font-size: 1.1rem; font-weight: 650; letter-spacing: -0.01em; margin: 2em 0 0.7em; }
p { margin: 0.4em 0; }

.muted { color: var(--muted); }
.small { font-size: 0.875rem; }

:focus-visible { outline: 3px solid #9dbbe6; outline-offset: 2px; }

/* ── Layout ── */
.wrap { max-width: 680px; margin: 0 auto; padding: 0 20px; }
main.wrap { padding-top: 12px; padding-bottom: 80px; }

/* ── Header ── */
.site-header { border-bottom: 1px solid var(--line); background: #fff; }
.header-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 56px; }
.brand { white-space: nowrap; font-weight: 700; font-size: 1.05rem; letter-spacing: -0.01em; color: var(--text); text-decoration: none; }
.site-header nav { display: flex; align-items: center; gap: 4px; }
.site-header nav a, .site-header nav .link-btn {
  padding: 6px 8px;
  color: var(--muted);
  font-size: 0.9rem;
  white-space: nowrap;
  text-decoration: none;
  border-radius: 8px;
}
.site-header nav a:hover, .site-header nav .link-btn:hover { background: var(--soft); }
.site-header nav a[aria-current="page"] { color: var(--blue); background: var(--blue-tint); font-weight: 600; }

/* ── Buttons ── */
.btn {
  display: inline-block;
  font: inherit;
  font-weight: 600;
  padding: 10px 18px;
  min-height: 46px;
  color: #fff;
  background: var(--blue);
  border: 0;
  border-radius: var(--radius-sm);
  text-decoration: none;
  text-align: center;
  cursor: pointer;
}
.btn:hover { background: var(--blue-dark); }
.btn:disabled { opacity: 0.55; cursor: default; }
.btn.secondary { color: var(--blue); background: var(--blue-tint); }
.btn.secondary:hover { background: #e0e9f7; }
.btn.block { display: block; width: 100%; }
.btn-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }

.link-btn { font: inherit; padding: 6px 0; color: var(--blue); background: none; border: 0; cursor: pointer; }
.link-btn:hover { text-decoration: underline; }
.link-btn.danger { color: var(--error); }

.icon-btn { width: 40px; height: 40px; font-size: 1.6rem; line-height: 1; color: var(--muted); background: none; border: 0; border-radius: 50%; cursor: pointer; }
.icon-btn:hover { background: var(--soft); }

/* ── Forms ── */
.field { display: block; margin: 16px 0; }
.field-label { display: block; font-weight: 600; font-size: 0.95rem; margin-bottom: 6px; }

input[type="text"], input[type="email"], input[type="search"], input[type="number"], textarea, select {
  width: 100%;
  font: inherit;               /* 16px keeps phones from zooming */
  color: var(--text);
  padding: 11px 14px;
  background: var(--soft);
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  -webkit-appearance: none;
  appearance: none;
}
input:focus, textarea:focus, select:focus { outline: none; background: #fff; border-color: var(--blue); box-shadow: 0 0 0 3px var(--blue-tint); }
textarea { resize: vertical; min-height: 110px; }
select {
  width: auto;
  max-width: 100%;
  padding-right: 32px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%23667085' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-position: right 12px center;
  background-size: 12px 8px;
  background-repeat: no-repeat;
}

.msg { min-height: 1.4em; margin: 8px 0; font-size: 0.95rem; }
.msg.error { color: var(--error); }
.msg.ok { color: var(--blue); }

.notice { padding: 12px 14px; margin: 12px 0; background: var(--blue-tint); border-radius: var(--radius-sm); }

/* ── Entry page ── */
.entry { max-width: 420px; margin: 0 auto; padding: 8vh 20px 32px; }
.entry .brand { display: block; margin-bottom: 28px; }
.entry h1 { font-size: 1.6rem; margin-bottom: 8px; }

/* ── Search, add, tabs ── */
.sticky-top { position: sticky; top: 0; z-index: 5; padding: 12px 0 8px; background: #fff; }
.searchbar { display: flex; gap: 8px; margin-bottom: 8px; }
.searchbar input { flex: 1; min-width: 0; padding: 12px 16px; }
.add-btn {
  flex: none;
  width: 50px;
  font-size: 1.8rem;
  font-weight: 300;
  line-height: 1;
  color: #fff;
  background: var(--blue);
  border: 0;
  border-radius: var(--radius-sm);
  cursor: pointer;
}
.add-btn:hover { background: var(--blue-dark); }

.tabs { display: flex; gap: 4px; padding: 4px; background: var(--soft); border-radius: var(--radius); }
.tab { flex: 1; font: inherit; font-weight: 600; padding: 8px 12px; color: var(--muted); background: none; border: 0; border-radius: 9px; cursor: pointer; }
.tab.on { color: var(--text); background: #fff; box-shadow: 0 1px 2px rgba(16, 24, 40, 0.08); }

.section-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin: 16px 0 10px; }
.section-head h1, .section-head h2 { margin: 0; }
.sort { margin-left: auto; color: var(--muted); font-size: 0.9rem; }
.sort select { padding: 7px 30px 7px 12px; margin-left: 4px; font-size: 0.9rem; }
.more { margin-top: 14px; width: 100%; }

/* ── Lists ── */
.list { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.list:empty { display: none; }
.list > p { margin: 0; padding: 16px; }
.row { border-bottom: 1px solid var(--line); }
.row:last-child { border-bottom: 0; }
.row-link { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 14px 16px; color: inherit; text-decoration: none; }
.row-link:hover { background: var(--soft); }
.row-main { display: flex; flex-direction: column; min-width: 0; }
.row-main strong { font-size: 1.05rem; font-weight: 650; }
.row-main .muted { font-size: 0.9rem; overflow: hidden; text-overflow: ellipsis; }
.row-side { display: flex; flex-direction: column; align-items: flex-end; flex: none; text-align: right; }
.rating { color: var(--blue); font-weight: 700; }

.chips { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 16px 14px; }
.chip { display: inline-block; padding: 3px 10px; font-size: 0.85rem; color: var(--blue); text-decoration: none; background: var(--blue-tint); border-radius: 999px; }
.chip:hover { background: #e0e9f7; }

/* ── Profile summary ── */
.summary { margin: 18px 0; padding: 18px; border: 1px solid var(--line); border-radius: var(--radius); }
.summary .label { font-weight: 600; color: var(--muted); font-size: 0.9rem; }
.summary .big { font-size: 2rem; font-weight: 700; letter-spacing: -0.02em; color: var(--blue); line-height: 1.25; }
.meter { height: 6px; margin: 10px 0 8px; background: var(--line); border-radius: 3px; overflow: hidden; }
.meter span { display: block; height: 100%; background: var(--blue); border-radius: 3px; }

/* ── Reviews ── */
.review { padding: 16px; border-bottom: 1px solid var(--line); }
.review:last-child { border-bottom: 0; }
.review-head { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; }
.review-text { margin: 8px 0 10px; white-space: pre-wrap; overflow-wrap: anywhere; }
.review-foot { display: flex; align-items: center; flex-wrap: wrap; gap: 2px 14px; color: var(--muted); font-size: 0.85rem; }
.review-foot .link-btn { font-size: 0.85rem; padding: 4px 0; }

/* ── Modal ── */
.modal { position: fixed; inset: 0; z-index: 50; display: flex; align-items: flex-end; justify-content: center; background: rgba(16, 24, 40, 0.4); }
.modal-box { width: 100%; max-width: 520px; max-height: 92vh; overflow-y: auto; padding: 8px 20px 24px; background: #fff; border-radius: 18px 18px 0 0; }
.modal-head { display: flex; align-items: center; justify-content: space-between; }
.modal-head h2 { margin: 10px 0; font-size: 1.2rem; }
@media (min-width: 600px) {
  .modal { align-items: center; }
  .modal-box { border-radius: 18px; }
}
.menu-list { display: grid; gap: 8px; margin-top: 8px; }
.menu-list .btn { text-align: left; padding: 14px 16px; }

/* ── Choice buttons (ratings, difficulty, report reasons) ── */
.choices { display: flex; gap: 6px; }
.choices.stack { flex-direction: column; }
.choice { flex: 1; font: inherit; padding: 10px 12px; min-height: 46px; color: var(--text); text-align: center; background: var(--soft); border: 1px solid transparent; border-radius: var(--radius-sm); cursor: pointer; }
.choice:hover { background: #ebeef3; }
.choices.stack .choice { text-align: left; }
.choice.on { color: #fff; background: var(--blue); }

/* ── Picker ── */
.picker-results { margin-top: 8px; border: 1px solid var(--line); border-radius: var(--radius-sm); overflow: hidden; }
.picker-results > p { padding: 10px 14px; margin: 0; }
.result { display: block; width: 100%; font: inherit; padding: 11px 14px; text-align: left; background: #fff; border: 0; border-bottom: 1px solid var(--line); cursor: pointer; }
.result:last-child { border-bottom: 0; }
.result:hover { background: var(--soft); }
.result.add-new { color: var(--blue); font-weight: 600; }
.chosen { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 11px 14px; background: var(--blue-tint); border-radius: var(--radius-sm); }
.picker-create { margin-top: 8px; padding: 2px 14px 14px; border: 1px solid var(--line); border-radius: var(--radius-sm); }
.fixed { display: flex; flex-direction: column; margin: 16px 0; }

/* ── Footer ── */
.site-footer { text-align: center; font-size: 0.7rem; color: var(--muted); opacity: 0.8; padding: 0 20px 20px; }