/* ---------------------------------------------------------------------------
   WKI Forum — standalone stylesheet.

   Deliberately not the Next.js build output: that file is content-hashed and
   changes on every rebuild, which a PHP app cannot follow. The tokens below are
   copied verbatim from app/globals.css and must stay in step with it.
   Border radius is 0 everywhere; the only round shapes are the orbit rings.
--------------------------------------------------------------------------- */

:root {
  --navy: #000075;
  --green: #0b9d59;
  --red: #bd0004;
  --paper: #f6f6f4;
  --ink: #1c1c22;
  --body: #4d4d58;
  --cap: #55557a;
  --shell: #0b0b26;
  --navy-05: #f0f0f7;
  --navy-20: #cbcbe5;
  --line: rgba(0, 0, 117, 0.13);
  --sans: "Helvetica Neue", Helvetica, Arial, "Liberation Sans", sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --ease: cubic-bezier(0.16, 0.8, 0.28, 1);
  --gutter: clamp(20px, 5vw, 88px);
}

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

body {
  margin: 0;
  background: #fff;
  color: var(--ink);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
  text-wrap: pretty;
}

img { max-width: 100%; display: block; }
a { color: var(--navy); text-decoration: none; transition: color 0.3s var(--ease); }
a:hover { color: var(--green); }

.container { width: 100%; padding-inline: var(--gutter); margin-inline: auto; max-width: 1560px; }
.section { padding-block: clamp(34px, 5vw, 76px); }
.paper { background: var(--paper); }

/* --------------------------------------------------------------- type --- */
.t-display { font-size: clamp(30px, 4.3vw, 60px); line-height: 1; letter-spacing: -0.03em; font-weight: 700; }
.t-h2 { font-size: clamp(25px, 3.1vw, 44px); line-height: 1.04; letter-spacing: -0.025em; font-weight: 700; color: var(--navy); }
.t-h3 { font-size: clamp(17px, 1.65vw, 24px); line-height: 1.22; letter-spacing: -0.015em; font-weight: 700; color: var(--navy); }
.t-lead { font-size: clamp(15px, 1.3vw, 19px); line-height: 1.62; color: var(--body); }
.t-body { font-size: clamp(13.5px, 1vw, 15.5px); line-height: 1.72; color: var(--body); }
.t-cap { font-family: var(--mono); font-size: 10.5px; line-height: 1; letter-spacing: 0.1em; text-transform: uppercase; color: var(--cap); }
.t-eyebrow { font-family: var(--mono); font-size: 11px; line-height: 1; letter-spacing: 0.18em; text-transform: uppercase; font-weight: 600; color: var(--green); margin: 0; }
.rule { height: 2px; background: var(--red); width: 54px; border: 0; margin: 18px 0 0; }

/* ------------------------------------------------------------- header --- */
.utility { background: var(--navy); color: rgba(255, 255, 255, 0.75); font-family: var(--mono); font-size: 11px; letter-spacing: 0.06em; }
.utility .container { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 42px; }
.utility a { color: rgba(255, 255, 255, 0.75); }
.utility a:hover { color: #fff; }

.masthead { border-bottom: 1px solid var(--line); background: #fff; position: sticky; top: 0; z-index: 40; }
.masthead .container { display: flex; align-items: center; gap: 22px; height: 76px; }
.brand { display: flex; align-items: center; gap: 12px; font-weight: 700; color: var(--navy); line-height: 1.15; font-size: 13px; }
.brand img { height: 46px; width: auto; }
.nav { display: flex; align-items: center; gap: 22px; margin-left: auto; }
.nav a { font-size: 12px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; }
.nav a.is-active { color: var(--green); }

.btn {
  display: inline-block; border: 1px solid var(--navy); background: var(--navy); color: #fff;
  padding: 13px 22px; font-size: 12px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase;
  font-family: var(--sans); cursor: pointer; transition: all 0.3s var(--ease);
}
.btn:hover { background: var(--green); border-color: var(--green); color: #fff; transform: translateY(-2px); }
.btn-ghost { background: transparent; color: var(--navy); }
.btn-ghost:hover { color: #fff; }
.btn-green { background: var(--green); border-color: var(--green); }
.btn-sm { padding: 9px 15px; font-size: 11px; }

/* --------------------------------------------------------------- hero --- */
.hero { background: var(--navy); color: #fff; position: relative; overflow: hidden; }
.hero .container { position: relative; padding-block: clamp(38px, 5.5vw, 86px); }
.hero h1 { color: #fff; margin: 14px 0 0; max-width: 16em; }
.hero .t-lead { color: rgba(255, 255, 255, 0.8); max-width: 34em; margin-top: 18px; }
.orbit { position: absolute; border: 1px solid rgba(255, 255, 255, 0.15); border-radius: 50%; pointer-events: none; }
.orbit-a { width: 620px; height: 620px; top: -46%; right: -6%; }
.orbit-b { width: 420px; height: 420px; bottom: -58%; right: 12%; border-color: rgba(11, 157, 89, 0.4); }

/* --------------------------------------------------------------- grid --- */
.grid { display: grid; gap: 22px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.layout { display: grid; grid-template-columns: 1fr 320px; gap: clamp(26px, 3.4vw, 56px); align-items: start; }

/* --------------------------------------------------------------- card --- */
.card { border: 1px solid var(--line); background: #fff; display: flex; flex-direction: column; transition: all 0.4s var(--ease); }
.card:hover { transform: translateY(-4px); border-color: var(--green); box-shadow: 0 18px 44px rgba(0, 0, 117, 0.12); }
.card .thumb { aspect-ratio: 16 / 10; overflow: hidden; background: var(--navy-05); }
.card .thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.7s var(--ease); }
.card:hover .thumb img { transform: scale(1.05); }
.card .pad { padding: 20px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.card h3 { margin: 0; }
.card .meta { margin-top: auto; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

.thumb-empty {
  aspect-ratio: 16 / 10;
  background: repeating-linear-gradient(-45deg, var(--navy-05) 0 10px, #fff 10px 20px);
}

.chip {
  display: inline-block; border: 1px solid var(--navy-20); padding: 7px 13px; font-family: var(--mono);
  font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--navy); background: #fff;
}
.chip:hover { border-color: var(--green); color: var(--green); }
.chip.is-active { background: var(--navy); border-color: var(--navy); color: #fff; }
.chip-green { background: var(--green); border-color: var(--green); color: #fff; }
.chip-red { background: var(--red); border-color: var(--red); color: #fff; }

.stars { color: var(--red); letter-spacing: 0.12em; font-size: 14px; }

/* ------------------------------------------------------------ sidebar --- */
.panel { border: 1px solid var(--line); padding: 20px; background: #fff; }
.panel + .panel { margin-top: 18px; }
.panel h2 { margin: 0 0 14px; font-size: 13px; letter-spacing: 0.1em; text-transform: uppercase; font-family: var(--mono); color: var(--navy); font-weight: 600; }
.panel ul { list-style: none; margin: 0; padding: 0; }
.panel li { padding: 11px 0; border-bottom: 1px solid var(--line); }
.panel li:last-child { border-bottom: 0; padding-bottom: 0; }
.tagcloud { display: flex; flex-wrap: wrap; gap: 8px; }

/* ------------------------------------------------------------ article --- */
.prose { max-width: 68ch; }
.prose p { font-size: clamp(14.5px, 1.05vw, 16.5px); line-height: 1.78; color: var(--body); margin: 0 0 18px; }
.prose p:first-of-type { font-size: clamp(16px, 1.25vw, 19px); color: var(--navy); font-weight: 500; line-height: 1.66; }
.breadcrumb { font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--cap); }
.byline { display: flex; align-items: center; gap: 13px; margin-top: 22px; }
.avatar {
  width: 46px; height: 46px; background: var(--navy); color: #fff; display: grid; place-items: center;
  font-weight: 700; font-size: 17px; flex-shrink: 0;
}

/* -------------------------------------------------------------- rating --- */
.rate { display: flex; align-items: center; gap: 4px; }
.rate button {
  background: none; border: 0; padding: 2px; cursor: pointer; font-size: 26px; line-height: 1;
  color: var(--navy-20); transition: color 0.2s var(--ease);
}
.rate button:hover, .rate button.on { color: var(--red); }

/* ------------------------------------------------------------ comments --- */
.comment { border-top: 1px solid var(--line); padding: 20px 0; }
.comment .replies { margin-left: 34px; border-left: 2px solid var(--navy-20); padding-left: 18px; }
.comment .replies .comment:first-child { border-top: 0; padding-top: 14px; }

/* --------------------------------------------------------------- form --- */
.field { display: block; margin-bottom: 18px; }
.field > span { display: block; font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--cap); margin-bottom: 8px; }
input[type=text], input[type=email], input[type=password], input[type=search], input[type=file], select, textarea {
  width: 100%; border: 1px solid var(--line); background: #fff; padding: 13px 15px; font-size: 14px;
  font-family: var(--sans); color: var(--ink); transition: border-color 0.3s var(--ease); border-radius: 0;
}
input:focus, select:focus, textarea:focus { outline: 0; border-color: var(--green); }
textarea { min-height: 150px; resize: vertical; line-height: 1.7; }
.hint { font-size: 12px; color: var(--cap); margin-top: 6px; }

.flash { padding: 14px 18px; margin-bottom: 20px; border-left: 3px solid var(--green); background: var(--navy-05); font-size: 14px; }
.flash-warn { border-left-color: var(--red); }
.errors { border-left: 3px solid var(--red); background: #fff5f5; padding: 14px 18px; margin-bottom: 20px; }
.errors ul { margin: 0; padding-left: 18px; font-size: 14px; color: var(--ink); }

.pagination { display: flex; gap: 8px; justify-content: center; margin-top: 34px; flex-wrap: wrap; }

/* -------------------------------------------------------------- footer --- */
.site-footer { background: var(--navy); color: rgba(255, 255, 255, 0.72); margin-top: 56px; }
.site-footer .container { padding-block: clamp(30px, 4vw, 58px); }
.site-footer a { color: rgba(255, 255, 255, 0.72); }
.site-footer a:hover { color: #fff; }
.site-footer .bottom { border-top: 1px solid rgba(255, 255, 255, 0.2); margin-top: 26px; padding-top: 20px; font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.08em; text-transform: uppercase; }

/* --------------------------------------------------------- responsive --- */
@media (max-width: 1024px) {
  .layout { grid-template-columns: 1fr; }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .nav { display: none; }
  .nav.mobile-open { display: flex; position: absolute; top: 76px; left: 0; right: 0; background: var(--navy); flex-direction: column; align-items: flex-start; gap: 0; padding: 12px var(--gutter) 22px; }
  .nav.mobile-open a { color: #fff; padding: 13px 0; width: 100%; border-bottom: 1px solid rgba(255, 255, 255, 0.15); }
  .burger { display: grid !important; }
}
@media (max-width: 640px) {
  .grid-3, .grid-2 { grid-template-columns: 1fr; }
  .utility .hide-sm { display: none; }
}
.burger {
  display: none; width: 46px; height: 46px; background: var(--navy); color: #fff; border: 0; margin-left: auto;
  place-items: center; cursor: pointer; font-size: 18px;
}

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

/* ------------------------------------------------------------- consent --- */
.consent {
  position: fixed; inset: auto 0 0 0; z-index: 60; background: var(--navy); color: #fff;
  border-top: 3px solid var(--green); box-shadow: 0 -12px 40px rgba(0, 0, 117, 0.28);
}
.consent-inner {
  max-width: 1560px; margin-inline: auto; padding: 18px var(--gutter);
  display: flex; align-items: center; justify-content: space-between; gap: 18px; flex-wrap: wrap;
}
.consent .t-body { color: rgba(255, 255, 255, 0.82); max-width: 62ch; }
.consent a { color: #fff; text-decoration: underline; }
.consent .btn-ghost { color: #fff; border-color: rgba(255, 255, 255, 0.45); }
@media (max-width: 640px) {
  .consent-inner { flex-direction: column; align-items: stretch; }
  .consent form { justify-content: stretch; }
  .consent form .btn { flex: 1; }
}
