/* Reklara, "İşaret": white paper, ink, a red pen, a yellow highlighter and a blue pencil.
   Red marks what to fix, yellow marks what needs one more fact, blue is what Reklara wrote.
   Shared by every page. */

:root {
  /* surfaces */
  --desk: #f2f0e8;
  --desk-2: #e9e6da;
  --paper: #fffefb;
  --paper-2: #faf8f1;
  /* ink */
  --ink: #14161a;
  --ink-2: #454a53;
  --ink-3: #5f6570;   /* small text: 5.1:1 on the desk, 5.8:1 on paper */
  --ink-4: #8b9099;   /* large numerals and icons only */
  --line: #e0dccf;
  --line-2: #cbc6b5;
  /* the three tools */
  --hl: #ffe14a;
  --hl-soft: #fff0a0;
  --hl-wash: #fff9d9;
  --red: #d92d20;
  --red-ink: #b42318;
  --red-wash: #fdecea;
  --blue: #2a48d4;
  --blue-wash: #e7ecff;

  --shadow-1: 0 1px 0 rgb(20 22 26 / .04), 0 1px 3px rgb(20 22 26 / .07);
  --shadow-2: 0 1px 0 rgb(20 22 26 / .04), 0 10px 28px -10px rgb(20 22 26 / .2);
  --shadow-3: 0 2px 0 rgb(20 22 26 / .03), 0 36px 70px -28px rgb(20 22 26 / .34);

  --r-1: 6px;
  --r-2: 10px;
  --r-3: 16px;
  --r-4: 26px;

  --disp: "Bricolage Grotesque", "Figtree", system-ui, sans-serif;
  --ui: "Figtree", system-ui, -apple-system, "Segoe UI", sans-serif;
  --serif: "Newsreader", "Iowan Old Style", Georgia, serif;
  --hand: "Caveat", "Segoe Print", cursive;

  --ease: cubic-bezier(.2, .7, .2, 1);
  --ease-out: cubic-bezier(.16, 1, .3, 1);
  --ease-spring: cubic-bezier(.34, 1.4, .64, 1);

  --wrap: 1240px;
  --gutter: clamp(18px, 4vw, 40px);
  color-scheme: light;
}

@property --p {
  syntax: "<percentage>";
  inherits: false;
  initial-value: 100%;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 88px; }
body {
  margin: 0;
  background: var(--desk);
  color: var(--ink);
  font: 400 1rem/1.55 var(--ui);
  font-feature-settings: "ss01", "cv11";
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-wrap: break-word;
}
h1, h2, h3, h4, p, figure, blockquote, dl, dd, ul, ol { margin: 0; }
ul[class], ol[class] { padding: 0; list-style: none; }
img, svg, video { display: block; max-width: 100%; }
img { height: auto; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
a { color: inherit; text-underline-offset: .18em; text-decoration-thickness: 1px; }
::selection { background: var(--hl); color: var(--ink); }
:focus { outline: none; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; border-radius: 4px; box-shadow: 0 0 0 5px var(--hl); }
[hidden] { display: none !important; }

h1, h2, h3, .disp {
  font-family: var(--disp);
  font-weight: 700;
  font-stretch: 88%;
  line-height: 1.02;
  letter-spacing: -.035em;
  text-wrap: balance;
}
p { text-wrap: pretty; }
.serif { font-family: var(--serif); }
.hand { font-family: var(--hand); font-weight: 600; letter-spacing: 0; }
.num { font-variant-numeric: tabular-nums lining-nums; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.wrap { width: min(100% - 2 * var(--gutter), var(--wrap)); margin-inline: auto; }

.eyebrow {
  display: inline-flex; align-items: center; gap: .6em;
  font: 700 .74rem/1 var(--ui); letter-spacing: .14em; text-transform: uppercase; color: var(--ink-2);
}
.eyebrow::before { content: ""; width: 1.6em; height: 2px; background: var(--red); border-radius: 2px; }

/* ---------- logo ---------- */
.logo {
  position: relative; display: inline-block; isolation: isolate;
  font: 800 1.42rem/1 var(--disp); font-stretch: 84%; letter-spacing: -.045em;
  color: var(--ink); text-decoration: none; padding: .12em .2em .16em;
}
.logo::before {
  content: ""; position: absolute; z-index: -1; inset: .18em -.02em .1em;
  background: var(--hl); border-radius: .18em .5em .22em .42em / .5em .2em .45em .24em;
  transform: rotate(-1.4deg);
  transition: transform .5s var(--ease-spring);
}
a.logo:hover::before { transform: rotate(1.2deg) scaleX(1.04); }

/* ---------- buttons ---------- */
.btn {
  --bg: var(--ink); --fg: #fff; --bd: var(--ink);
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: .55em;
  min-height: 46px; padding: .7em 1.25em; border-radius: 999px;
  background: var(--bg); color: var(--fg); border: 1.5px solid var(--bd);
  font: 700 .98rem/1.1 var(--ui); letter-spacing: -.005em; text-decoration: none; white-space: nowrap;
  transition: transform .25s var(--ease-out), box-shadow .25s var(--ease-out), background-color .2s, color .2s;
  -webkit-tap-highlight-color: transparent;
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 6px 0 -2px var(--hl), 0 14px 24px -12px rgb(20 22 26 / .5); }
.btn:active { transform: translateY(0); box-shadow: none; transition-duration: .05s; }
.btn svg { width: 1.1em; height: 1.1em; flex: none; }
.btn--paper { --bg: var(--paper); --fg: var(--ink); --bd: var(--ink); }
.btn--ghost { --bg: transparent; --fg: var(--ink); --bd: var(--line-2); }
.btn--ghost:hover { --bd: var(--ink); box-shadow: none; }
.btn--hl { --bg: var(--hl); --fg: var(--ink); --bd: var(--ink); }
.btn--hl:hover { box-shadow: 0 6px 0 -2px var(--ink), 0 14px 24px -12px rgb(20 22 26 / .5); }
.btn--sm { min-height: 36px; padding: .45em .95em; font-size: .88rem; }
.btn--lg { min-height: 56px; padding: .85em 1.6em; font-size: 1.06rem; }
.btn[disabled], .btn[aria-disabled="true"] { opacity: .45; pointer-events: none; }
.btn .arrow { transition: transform .3s var(--ease-out); }
.btn:hover .arrow { transform: translateX(4px); }

.link {
  font-weight: 600; text-decoration: underline; text-decoration-color: var(--line-2);
  text-decoration-thickness: 2px; text-underline-offset: .22em; transition: text-decoration-color .2s;
}
.link:hover { text-decoration-color: var(--ink); }

/* ---------- the marks ---------- */
/* Düzelt: a red pen squiggle. The wave is a background so it can wriggle as it lands. */
.m-fix {
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='5' viewBox='0 0 12 5'%3E%3Cpath d='M0 2.5Q3 -.4 6 2.5T12 2.5' fill='none' stroke='%23d92d20' stroke-width='1.35' stroke-linecap='round'/%3E%3C/svg%3E") repeat-x 0 100% / .62em .27em;
  padding-bottom: .24em;
  color: var(--red-ink);
  -webkit-box-decoration-break: clone; box-decoration-break: clone;
}
/* Kontrol et: a swipe of highlighter. */
.m-ask {
  --p: 100%;
  background: linear-gradient(var(--hl), var(--hl)) no-repeat 0 55% / var(--p) 86%;
  padding: .04em .16em; margin: 0 -.16em;
  border-radius: .22em .1em .28em .12em / .3em .2em .26em .18em;
  -webkit-box-decoration-break: clone; box-decoration-break: clone;
}
/* What Reklara added: blue pencil. */
.m-add {
  color: var(--blue); font-weight: 600;
  background: linear-gradient(var(--blue-wash), var(--blue-wash)) no-repeat 0 100% / var(--p, 100%) 100%;
  padding: .04em .14em; margin: 0 -.14em; border-radius: .2em;
  -webkit-box-decoration-break: clone; box-decoration-break: clone;
}
.m-del { text-decoration: line-through; text-decoration-color: var(--red); text-decoration-thickness: 1.5px; color: var(--ink-3); }

@media (prefers-reduced-motion: no-preference) {
  .marks-in .m-fix { animation: squiggle .9s var(--ease-out) both; animation-delay: calc(var(--i, 0) * 140ms + 120ms); }
  .marks-in .m-ask { animation: swipe .7s var(--ease-out) both; animation-delay: calc(var(--i, 0) * 140ms + 120ms); }
  .marks-in .m-add { animation: swipe .6s var(--ease-out) both; animation-delay: calc(var(--i, 0) * 90ms + 80ms); }
}
@keyframes squiggle {
  0% { background-size: .62em 0; background-position-x: -2.4em; color: inherit; }
  60% { background-size: .62em .34em; }
  100% { background-size: .62em .27em; background-position-x: 0; }
}
@keyframes swipe { from { --p: 0%; } to { --p: 100%; } }

/* ---------- band chips ---------- */
.band {
  display: inline-flex; align-items: center; gap: .4em; vertical-align: middle;
  height: 1.75em; padding: 0 .65em 0 .5em; border-radius: 999px;
  font: 700 .78rem/1 var(--ui); letter-spacing: .005em; white-space: nowrap;
  border: 1.5px solid transparent;
}
.band svg { width: 1.05em; height: 1.05em; flex: none; }
.band--fix { background: var(--red-wash); color: var(--red-ink); border-color: rgb(217 45 32 / .28); }
.band--ask { background: var(--hl); color: var(--ink); border-color: rgb(20 22 26 / .12); }
.band--ok { background: transparent; color: var(--ink-2); border-color: var(--line-2); }
.band--lg { font-size: .9rem; }

/* ---------- the verdict as a mark on paper, and the numbers that tie a mark to its note ---------- */
.stamp { position: relative; display: inline-block; font: 800 1.9rem/1 var(--disp); font-stretch: 86%; letter-spacing: -.04em; padding: .12em .32em; isolation: isolate; white-space: nowrap; }
.stamp--fix { color: var(--red-ink); transform: rotate(-3.5deg); margin: 6px 8px 0 0; }
.stamp__ring { position: absolute; inset: -.3em -.42em -.34em; width: calc(100% + .84em); height: calc(100% + .64em); color: var(--red); overflow: visible; z-index: -1; }
.stamp__ring path { stroke-dasharray: 1; stroke-dashoffset: 0; animation: ring .9s var(--ease-out) .15s backwards; }
@keyframes ring { from { stroke-dashoffset: 1; } }
.stamp--ask { transform: rotate(-2deg); margin: 4px 4px 0 0; }
.stamp--ask::before { content: ""; position: absolute; inset: .1em -.04em .02em; background: var(--hl); z-index: -1; border-radius: .2em .5em .24em .44em / .5em .2em .46em .24em; animation: sweep .6s var(--ease-out) .1s backwards; transform-origin: left; }
@keyframes sweep { from { transform: scaleX(0); } }
.stamp--ok { font-size: 1.5rem; color: var(--ink-2); font-weight: 700; padding: .3em .6em; border: 1.5px solid var(--line-2); border-radius: 999px; }
.ref {
  display: inline-grid; place-items: center; width: 1.5em; height: 1.5em; border-radius: 50%; flex: none;
  font: 800 .72rem/1 var(--ui); font-variant-numeric: tabular-nums; background: var(--paper); border: 1.5px solid currentColor;
}
.ref--fix { color: var(--red-ink); border-color: var(--red); }
.ref--ask { background: var(--hl); color: var(--ink); border-color: var(--ink); }
sup.ref { font-size: .58em; vertical-align: .9em; margin-left: .25em; line-height: 1; position: relative; top: .1em; }

/* ---------- paper ---------- */
.sheet {
  background: var(--paper); border: 1px solid var(--line);
  border-radius: var(--r-3); box-shadow: var(--shadow-2);
}
.rule-line { height: 1px; background: var(--line); border: 0; margin: 0; }
/* A name the page does not show: a marker bar over the word, as in a published decision. */
.redact { display: inline-block; width: 4.4em; height: .78em; margin: 0 .1em; vertical-align: -.04em; border-radius: 2px 3px 2px 4px; background: var(--ink); opacity: .86; transform: rotate(-.5deg); }
.footline { font: 500 .8rem/1.4 var(--ui); color: var(--ink-3); }

/* ---------- forms ---------- */
.field {
  width: 100%; padding: .7em .9em; border-radius: var(--r-2);
  background: var(--paper); border: 1.5px solid var(--line-2); color: var(--ink);
  transition: border-color .2s, box-shadow .2s;
}
.field::placeholder { color: var(--ink-3); }
.field:hover { border-color: var(--ink-3); }
.field:focus-visible { border-color: var(--ink); box-shadow: 0 0 0 4px var(--hl); outline: none; }

/* ---------- small things ---------- */
.kbd { font: 600 .74rem/1 var(--ui); padding: .25em .45em; border: 1px solid var(--line-2); border-bottom-width: 2px; border-radius: 5px; color: var(--ink-2); background: var(--paper); }
.dot { width: .5em; height: .5em; border-radius: 50%; background: currentColor; display: inline-block; }

.skip {
  position: fixed; top: 10px; left: 10px; z-index: 100; transform: translateY(-200%);
  background: var(--ink); color: #fff; padding: .7em 1em; border-radius: 10px; font-weight: 700; text-decoration: none;
}
.skip:focus-visible { transform: none; }

/* paper grain: a faint fibre so large flat areas do not look digital */
.grain::after {
  content: ""; position: absolute; inset: 0; pointer-events: none; z-index: 0; opacity: .5; mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .1 0 0 0 0 .1 0 0 0 0 .08 0 0 0 .09 0'/%3E%3C/filter%3E%3Crect width='220' height='220' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* entrance: content rises as it scrolls in. JS adds .is-in; without JS everything is visible. */
.js [data-rise] { opacity: 0; transform: translateY(12px); transition: opacity .28s var(--ease-out), transform .5s var(--ease-out); transition-delay: calc(var(--d, 0) * 60ms); }
.js [data-rise].is-in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
  .js [data-rise] { opacity: 1; transform: none; }
}
