/* KKTAM public site, direction A (docs/tasarim/kktam). One stylesheet, no build step. */

:root {
  --navy: #13294b;
  --accent: #0b6e99;
  --text: #1c2430;
  --text-2: #2e3a4a;
  --text-3: #4a5566;
  --line: #d9dee6;
  --line-strong: #9aa6b8;
  --soft: #f3f5f8;
  --tag: #e8eef6;
  --muted-on-navy: #b9c6dc;
  --ok: #1f6b3a;
  --error: #a3261b;
  --serif: "Source Serif 4", "Source Serif Pro", Georgia, "Times New Roman", serif;
  --sans: Inter, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --gutter: 24px;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: #ffffff;
  color: var(--text);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.5;
  overflow-wrap: break-word;
}

a { color: var(--navy); text-decoration: none; }
a:hover { color: var(--accent); text-decoration: underline; }

:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

h1, h2, h3 { font-family: var(--serif); color: var(--navy); margin: 0; line-height: 1.2; }

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.skip-link {
  position: absolute; left: 8px; top: -48px; background: var(--navy); color: #fff;
  padding: 10px 14px; z-index: 10;
}
.skip-link:focus { top: 8px; color: #fff; }

.wrap { max-width: 1200px; margin: 0 auto; padding: 0 var(--gutter); }

/* -- top bar and header ------------------------------------------------------------------- */

.topbar { background: var(--navy); color: #fff; font-size: 13px; }
.topbar .wrap {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 8px 16px; min-height: 44px; padding-top: 6px; padding-bottom: 6px;
}
.topbar a, .topbar button.linklike { color: #fff; }
.topbar .tagline { opacity: 0.85; }
.topbar .account { display: flex; flex-wrap: wrap; gap: 8px 20px; align-items: center; }
.topbar .account strong { font-weight: 600; }
.topbar form { margin: 0; }

button.linklike {
  background: none; border: 0; padding: 0; font: inherit; cursor: pointer; color: var(--navy);
}
button.linklike:hover { text-decoration: underline; }

.site-header { border-bottom: 1px solid var(--line); }
.site-header .wrap {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 16px 24px; padding-top: 24px; padding-bottom: 24px;
}
.brand { display: flex; align-items: center; gap: 14px; color: var(--navy); }
.brand:hover { text-decoration: none; }
.logo-placeholder {
  width: 52px; height: 52px; border: 2px dashed var(--line-strong); display: flex;
  align-items: center; justify-content: center; font-size: 10px; color: #5b6778; flex: none;
}
.brand-name {
  display: block; font-family: var(--serif); font-size: 30px; font-weight: 700; letter-spacing: 0.5px;
  line-height: 1.1;
}
.brand-sub { font-size: 13px; color: var(--text-3); }
.main-nav ul {
  list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px 28px;
  font-size: 15px; font-weight: 500;
}
.main-nav a { display: inline-block; padding: 6px 0; }
.main-nav a[aria-current="page"] { color: var(--accent); border-bottom: 2px solid var(--accent); }

/* -- layout ------------------------------------------------------------------------------- */

main { display: block; }
.page { padding-top: 40px; padding-bottom: 64px; display: flex; flex-direction: column; gap: 40px; }
.page.narrow { max-width: 820px; }
.eyebrow {
  font-size: 12px; font-weight: 600; letter-spacing: 1.5px; text-transform: uppercase;
  color: var(--accent);
}
.lead { font-family: var(--serif); font-size: 19px; line-height: 1.55; color: var(--text-2); margin: 0; }
.muted { color: var(--text-3); font-size: 14px; }
.prose { font-size: 16px; line-height: 1.7; color: var(--text-2); }
.prose h2 { font-size: 24px; margin: 32px 0 8px; }
.prose h3 { font-size: 19px; margin: 24px 0 6px; }
.prose p, .prose ul, .prose ol { margin: 0 0 14px; }
.draft-note {
  background: var(--soft); border-left: 4px solid var(--accent); padding: 12px 16px;
  font-size: 14px; color: var(--text-2);
}

.grid-2 {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(min(320px, 100%), 1fr));
  gap: 40px; align-items: start;
}

/* -- buttons and forms -------------------------------------------------------------------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; min-height: 44px;
  padding: 0 20px; font: inherit; font-size: 14px; font-weight: 600; cursor: pointer;
  border: 1px solid var(--navy); background: var(--navy); color: #fff;
}
.btn:hover { background: #0e1f39; color: #fff; text-decoration: none; }
.btn.secondary { background: #fff; color: var(--navy); }
.btn.secondary:hover { background: var(--soft); color: var(--navy); }

.chips { display: flex; flex-wrap: wrap; gap: 8px; font-size: 14px; }
.chip {
  display: inline-flex; align-items: center; min-height: 44px; padding: 8px 14px;
  border: 1px solid #c3cbd7; background: #fff; color: var(--text);
}
.chip:hover { text-decoration: none; border-color: var(--navy); }
.chip[aria-current="true"] { background: var(--navy); border-color: var(--navy); color: #fff; }

.form { display: flex; flex-direction: column; gap: 14px; }
.form label, .field-label { font-size: 14px; font-weight: 600; }
.form input[type="email"], .form input[type="password"], .form input[type="text"],
.form input[type="search"], .form input[type="date"], .form textarea {
  width: 100%; min-height: 48px; padding: 0 14px; border: 1px solid var(--line-strong);
  font: inherit; color: var(--text); background: #fff; border-radius: 0;
}
.form textarea { padding: 12px 14px; min-height: 110px; resize: vertical; }
.form .help { font-size: 13px; color: var(--text-3); margin: -6px 0 0; }
.form .check { display: flex; gap: 10px; align-items: flex-start; font-size: 13px; font-weight: 400; line-height: 1.5; color: var(--text-2); }
.form .check input { margin-top: 3px; width: 18px; height: 18px; flex: none; }
.errorlist { list-style: none; margin: 0; padding: 0; color: var(--error); font-size: 14px; }
.card {
  background: #fff; border-top: 4px solid var(--navy); padding: 32px;
  display: flex; flex-direction: column; gap: 16px;
}
.card h2 { font-size: 24px; }

.messages { list-style: none; margin: 0; padding: 0; }
.messages li { background: #e7f3ec; color: var(--ok); padding: 12px 16px; font-size: 14px; }
.messages li.error { background: #fbeaea; color: var(--error); }

.notice { background: var(--soft); padding: 20px 24px; display: flex; flex-direction: column; gap: 8px; }
.notice h2, .notice h3 { font-size: 20px; font-family: var(--serif); color: var(--navy); margin: 0; }
.chips.spaced { margin-top: 10px; }
.notice p { margin: 0; color: var(--text-2); }

/* -- home --------------------------------------------------------------------------------- */

.hero h1 { font-size: 44px; line-height: 1.12; }
.hero { display: flex; flex-direction: column; gap: 16px; }
.counts { border-top: 4px solid var(--navy); padding-top: 16px; display: flex; flex-direction: column; gap: 14px; }
.counts h2 { font-size: 22px; }
.stat-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.stat { background: var(--soft); padding: 16px; }
.stat .num { font-size: 28px; font-weight: 600; color: var(--navy); line-height: 1.2; }
.stat .cap { font-size: 13px; color: var(--text-3); }

table.data { width: 100%; border-collapse: collapse; font-size: 14px; }
table.data th, table.data td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
table.data th { font-weight: 600; color: var(--text-2); border-bottom: 2px solid var(--navy); }
table.data td.num, table.data th.num { text-align: right; font-variant-numeric: tabular-nums; }
.table-scroll { overflow-x: auto; }

.cta {
  background: var(--soft); padding: 32px; display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr)); gap: 24px; align-items: center;
}
.cta h2 { font-size: 26px; margin-bottom: 8px; }
.cta p { margin: 0; font-size: 15px; line-height: 1.6; color: var(--text-2); }
.cta form { display: flex; flex-wrap: wrap; gap: 10px; }
.cta input[type="email"] {
  flex: 1 1 220px; min-width: 0; min-height: 44px; padding: 0 14px;
  border: 1px solid var(--line-strong); font: inherit;
}

/* -- news list ---------------------------------------------------------------------------- */

.search { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.search input[type="search"] {
  flex: 1 1 320px; min-width: 0; min-height: 48px; padding: 0 16px;
  border: 1px solid var(--line-strong); font: inherit; font-size: 16px;
}
.search label.inline { display: flex; align-items: center; gap: 8px; font-size: 14px; min-height: 48px; }
.search .btn { min-height: 48px; padding: 0 24px; }

.list-layout { display: flex; flex-wrap: wrap; gap: 24px 40px; align-items: flex-start; }
/* Filters fold away on phones (closed by default, no JavaScript). On wider screens they are
   always shown where the browser supports ::details-content; elsewhere the toggle stays. */
.filters-panel { flex: 1 1 240px; min-width: 0; }
.filters-panel > summary {
  cursor: pointer; min-height: 44px; display: flex; align-items: center; padding: 0 16px;
  border: 1px solid var(--navy); color: var(--navy); font-weight: 600; font-size: 14px;
}
.filters-panel[open] > summary { margin-bottom: 16px; }
@supports selector(::details-content) {
  @media (min-width: 720px) {
    .filters-panel > summary { display: none; }
    .filters-panel::details-content { content-visibility: visible; display: contents; }
  }
}
.filters { max-width: 100%; display: flex; flex-direction: column; gap: 22px; font-size: 14px; }
@media (min-width: 720px) { .filters-panel { max-width: 280px; } }
.filters fieldset {
  border: 0; border-top: 2px solid var(--navy); padding: 12px 0 0; margin: 0;
  display: flex; flex-direction: column; gap: 4px; min-width: 0;
}
.filters legend { font-family: var(--serif); font-size: 17px; font-weight: 600; color: var(--navy); padding: 0 8px 0 0; }
.filters ul { list-style: none; margin: 0; padding: 0; }
.filters label { display: flex; align-items: center; gap: 8px; min-height: 32px; }
.filters input[type="checkbox"] { width: 18px; height: 18px; flex: none; }
.filters input[type="date"] { width: 100%; min-height: 40px; padding: 0 10px; border: 1px solid var(--line-strong); font: inherit; }
.filters .date-label { font-weight: 500; min-height: 0; margin-top: 6px; }
.results { flex: 999 1 560px; min-width: 0; display: flex; flex-direction: column; }
.results-head {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; font-size: 14px;
  color: var(--text-3); padding-bottom: 12px; border-bottom: 1px solid var(--line);
}
.result { display: flex; flex-direction: column; gap: 6px; padding: 20px 0; border-bottom: 1px solid var(--line); }
.result h2 { font-size: 22px; line-height: 1.3; }
.result p { margin: 0; font-size: 15px; line-height: 1.55; color: var(--text-2); }
.meta { display: flex; flex-wrap: wrap; gap: 4px 16px; font-size: 13px; color: var(--text-3); }
.empty { padding: 32px 0; color: var(--text-2); }

.pagination { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding-top: 24px; font-size: 14px; }
.pagination a, .pagination span.current {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 14px; border: 1px solid #c3cbd7;
}
.pagination span.current { background: var(--navy); color: #fff; border-color: var(--navy); }

/* -- article ------------------------------------------------------------------------------ */

.article-layout { display: flex; flex-wrap: wrap; gap: 48px; align-items: flex-start; }
.article { flex: 999 1 640px; min-width: 0; display: flex; flex-direction: column; gap: 20px; }
.article h1 { font-size: 40px; line-height: 1.15; }
.breadcrumb { font-size: 13px; color: var(--text-3); }
.tags { display: flex; flex-wrap: wrap; gap: 8px; font-size: 12px; font-weight: 600; }
.tag { background: var(--tag); color: var(--navy); padding: 4px 10px; }
.tag.soft { background: var(--soft); color: var(--text-3); }
.byline {
  display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 14px; color: var(--text-3);
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 12px 0;
}
.tabs { display: flex; flex-wrap: wrap; border-bottom: 2px solid var(--navy); }
.tabs a {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 20px; font-size: 14px;
  font-weight: 600; color: var(--navy); background: #fff;
}
.tabs a:hover { text-decoration: none; background: var(--soft); }
.tabs a[aria-current="page"] { background: var(--navy); color: #fff; }
.text { font-family: var(--serif); font-size: 19px; line-height: 1.7; color: var(--text); display: flex; flex-direction: column; gap: 18px; }
.text p { margin: 0; }
.text .text-lead { font-weight: 600; }
.side-by-side {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr)); gap: 32px;
  font-family: var(--serif); font-size: 17px; line-height: 1.65;
}
.side-by-side > div { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.side-by-side > div + div { border-left: 1px solid var(--line); padding-left: 24px; }
.side-by-side p { margin: 0; }
.col-label { font-family: var(--sans); font-size: 12px; font-weight: 600; color: var(--accent); letter-spacing: 0.5px; text-transform: uppercase; }
.report { background: var(--soft); padding: 18px 20px; display: flex; flex-direction: column; gap: 12px; font-size: 14px; }
.report summary { cursor: pointer; font-weight: 600; color: var(--navy); min-height: 44px; display: flex; align-items: center; }
.aside { flex: 1 1 280px; min-width: 0; display: flex; flex-direction: column; gap: 24px; }
.aside section { border-top: 4px solid var(--navy); padding-top: 14px; display: flex; flex-direction: column; gap: 8px; font-size: 14px; }
.aside h2 { font-size: 20px; }

/* -- membership --------------------------------------------------------------------------- */

.auth-layout { display: flex; flex-wrap: wrap; gap: 48px; align-items: flex-start; max-width: 1040px; }
.auth-layout > section { flex: 1 1 340px; min-width: 0; display: flex; flex-direction: column; gap: 18px; }
.auth-layout > .card { flex: 1 1 340px; min-width: 0; }
.auth-layout h1 { font-size: 38px; line-height: 1.15; }
.auth-layout ul.benefits { margin: 0; padding-left: 20px; font-size: 15px; line-height: 1.9; color: var(--text-2); }

/* -- footer ------------------------------------------------------------------------------- */

.site-footer { border-top: 1px solid var(--line); font-size: 13px; color: var(--text-3); }
.site-footer .wrap {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px 24px;
  padding-top: 24px; padding-bottom: 24px;
}
.site-footer ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px 20px; }
.site-footer a { color: var(--text-3); }

/* -- phone width -------------------------------------------------------------------------- */

@media (max-width: 640px) {
  :root { --gutter: 16px; }
  .site-header .wrap { padding-top: 16px; padding-bottom: 16px; }
  .brand-name { font-size: 26px; }
  .main-nav ul { gap: 4px 20px; }
  .page { padding-top: 28px; gap: 32px; }
  .hero h1 { font-size: 32px; }
  .article h1 { font-size: 30px; }
  .auth-layout h1 { font-size: 30px; }
  .card, .cta { padding: 20px 16px; }
  .text { font-size: 18px; }
  .side-by-side > div + div { border-left: 0; padding-left: 0; border-top: 1px solid var(--line); padding-top: 16px; }
}

/* Flex children may shrink below their content width (no horizontal page scroll). */
.page > *, .form > *, .list-layout > *, .article-layout > * { min-width: 0; }
h1, h2, h3 { overflow-wrap: anywhere; }
.search input[type="search"] { width: auto; }
