/* Legal & KVKK pages (owner: legal). Long-form documents with sticky TOC, KVKK hub, application form.
   Builds on main.css tokens/components; nothing here overrides shared components globally. */

/* ---------- Hero meta (version line) ---------- */
.legal-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .5rem .75rem;
  margin: 1.5rem 0 0;
  padding: 0;
  list-style: none;
  font-size: var(--fs-xs);
  color: var(--text-2);
}
.legal-meta li {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  padding: .32rem .8rem;
  border: 1px solid rgba(244, 229, 222, .22);
  border-radius: 999px;
  background: rgba(255, 255, 255, .05);
  letter-spacing: .02em;
}
.legal-meta .icon { width: 15px; height: 15px; color: var(--brass-300); }
.legal-meta strong { color: var(--cream-50); font-weight: 600; }

/* ---------- Document layout: sticky TOC + paper ---------- */
.legal-section { padding-top: clamp(28px, 1rem + 3vw, 64px); }
.legal-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 20px;
  align-items: start;
}
@media (min-width: 1000px) {
  .legal-layout { grid-template-columns: 250px minmax(0, 1fr); gap: 48px; }
}
@media (min-width: 1200px) {
  .legal-layout { grid-template-columns: 270px minmax(0, 1fr); gap: 56px; }
}

.legal-aside { min-width: 0; }
@media (min-width: 1000px) {
  .legal-aside {
    position: sticky;
    top: calc(var(--header-h) + 24px);
    max-height: calc(100vh - var(--header-h) - 48px);
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-width: thin;
    scrollbar-color: var(--cream-300) transparent;
    padding: 2px 6px 8px 2px;
  }
}

.legal-toc {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}
.legal-toc__summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 52px;
  padding: .75rem 1.1rem;
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--navy-900);
  cursor: pointer;
  list-style: none;
  border-radius: var(--radius);
}
.legal-toc__summary::-webkit-details-marker { display: none; }
.legal-toc__summary .icon { width: 18px; height: 18px; color: var(--red-700); transition: transform var(--dur) var(--ease); }
.legal-toc[open] .legal-toc__summary .icon { transform: rotate(180deg); }
.legal-toc__count { margin-left: auto; font-weight: 600; letter-spacing: .04em; text-transform: none; color: var(--text-muted); }
.legal-toc__nav { padding: 0 .6rem .7rem; border-top: 1px solid var(--border); }
.legal-toc__list {
  counter-reset: toc;
  margin: 0;
  padding: .55rem 0 0;
  list-style: none;
  font-size: .875rem;
  line-height: 1.4;
}
.legal-toc__list li { counter-increment: toc; }
.legal-toc__list a {
  position: relative;
  display: grid;
  grid-template-columns: 1.9rem minmax(0, 1fr);
  gap: .2rem;
  padding: .48rem .55rem;
  border-radius: 8px;
  color: var(--ink-700);
  text-decoration: none;
  transition: background-color var(--dur) var(--ease), color var(--dur) var(--ease);
}
.legal-toc__list a::before {
  content: counter(toc, decimal-leading-zero);
  font-variant-numeric: tabular-nums;
  font-size: .75rem;
  font-weight: 700;
  line-height: 1.85;
  color: var(--brass-700);
}
.legal-toc__list a:hover { background: var(--cream-100); color: var(--navy-900); }
.legal-toc__list a.is-active { background: var(--cream-100); color: var(--navy-900); font-weight: 600; }
.legal-toc__list a.is-active::after {
  content: "";
  position: absolute;
  left: -.6rem;
  top: .45rem;
  bottom: .45rem;
  width: 3px;
  border-radius: 0 3px 3px 0;
  background: var(--red-700);
}
@media (min-width: 1000px) {
  .legal-toc { box-shadow: none; background: transparent; border: 0; }
  .legal-toc__summary { min-height: 0; padding: 0 0 .8rem .55rem; cursor: default; }
  .legal-toc__summary .icon { display: none; }
  .legal-toc__nav { padding: 0; border-top: 1px solid var(--border); }
  .legal-toc__count { display: none; }
}

.legal-aside__actions {
  display: grid;
  gap: 4px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}
@media (max-width: 999.98px) {
  .legal-aside__actions { display: none; }
}
.legal-action {
  display: flex;
  align-items: center;
  gap: .6rem;
  width: 100%;
  padding: .5rem .55rem;
  border: 0;
  border-radius: 8px;
  background: none;
  color: var(--navy-900);
  font-size: .875rem;
  font-weight: 600;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
  transition: background-color var(--dur) var(--ease), color var(--dur) var(--ease);
}
.legal-action:hover { background: var(--cream-100); color: var(--red-700); }
.legal-action .icon { width: 18px; height: 18px; color: var(--red-700); }

/* Paper: the document itself */
.legal-paper {
  position: relative;
  min-width: 0;
  padding: clamp(24px, 1rem + 3.2vw, 64px) clamp(18px, .5rem + 3.6vw, 64px) clamp(28px, 1rem + 3vw, 56px);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}
.legal-paper::before {
  content: "";
  position: absolute;
  top: -1px;
  left: clamp(18px, .5rem + 3.6vw, 64px);
  width: 72px;
  height: 4px;
  border-radius: 0 0 4px 4px;
  background: linear-gradient(90deg, var(--red-700), var(--brass-500));
}
@media (max-width: 599.98px) {
  .legal-section > .container { padding-inline: 12px; }
  .legal-paper { border-radius: var(--radius); }
}

/* ---------- Legal prose ---------- */
.legal-prose { max-width: none; font-size: clamp(1rem, .97rem + .16vw, 1.0625rem); line-height: 1.75; counter-reset: sec; }
.legal-prose > :is(p, ul, ol, h2, h3, h4, dl) { max-width: 74ch; }
.legal-prose > * + * { margin-top: 1.05em; }
.legal-prose h2 {
  counter-increment: sec;
  position: relative;
  margin-top: 2.6em;
  padding-top: 1.4em;
  border-top: 1px solid var(--border);
  font-size: clamp(1.4rem, 1.22rem + .75vw, 1.8rem);
  line-height: 1.22;
}
.legal-prose h2::before {
  content: counter(sec, decimal-leading-zero);
  display: block;
  margin-bottom: .45rem;
  font-family: var(--font-body);
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .18em;
  color: var(--red-700);
}
.legal-prose h2[data-unnumbered] { counter-increment: none; }
.legal-prose h2[data-unnumbered]::before { content: none; }
.legal-prose > h2:first-child, .legal-prose > .legal-summary + h2 { margin-top: 1.6em; }
.legal-prose > :first-child { margin-top: 0; }
.legal-prose h3 { margin-top: 1.7em; font-size: clamp(1.15rem, 1.07rem + .35vw, 1.3rem); }
.legal-prose h4 { margin-top: 1.4em; }
.legal-prose li > p { margin: 0; }
.legal-prose li > ul, .legal-prose li > ol { margin-top: .45em; }
.legal-prose ol.legal-alpha { list-style: none; padding-left: 2.2em; counter-reset: none; }
.legal-prose ol.legal-alpha > li { position: relative; }
.legal-prose ol.legal-alpha > li::before {
  content: attr(data-letter) ")";
  position: absolute;
  left: -2.2em;
  width: 1.8em;
  text-align: right;
  font-weight: 700;
  color: var(--red-700);
}
.legal-prose .legal-ref { font-size: .82em; color: var(--text-muted); white-space: nowrap; }
.legal-prose abbr[title] { text-decoration: underline dotted; text-underline-offset: .2em; cursor: help; }
.legal-prose .alert { max-width: none; margin-bottom: 0; font-size: .95rem; }
.legal-prose .alert p + p { margin-top: .5em; }

/* Summary box (layered notice: short layer first) */
.legal-summary {
  position: relative;
  padding: clamp(18px, 1rem + 1vw, 28px) clamp(18px, 1rem + 1.4vw, 32px);
  border: 1px solid #E8D9C7;
  border-radius: var(--radius);
  background:
    radial-gradient(ellipse 60% 120% at 100% 0%, rgba(176, 141, 87, .12), transparent 60%),
    var(--cream-100);
}
.legal-summary__title {
  display: flex;
  align-items: center;
  gap: .55rem;
  margin: 0 0 .9rem;
  font-family: var(--font-body);
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--red-700);
}
.legal-summary__title::before {
  content: "";
  width: 7px;
  height: 7px;
  background: var(--brass-500);
  transform: rotate(45deg);
}
.legal-prose .legal-summary__list, .legal-summary__list { display: grid; gap: .7rem; margin: 0; padding: 0; list-style: none; }
.legal-prose .legal-summary__list > li + li { margin-top: 0; }
@media (min-width: 760px) {
  .legal-summary__list--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .85rem 1.75rem; }
}
.legal-prose .legal-summary__list > li { margin: 0; padding-left: 1.85rem; font-size: .95rem; line-height: 1.55; }
.legal-prose .legal-summary__list > li::before {
  content: "";
  left: 0;
  top: .2em;
  width: 1.15rem;
  height: 1.15rem;
  background: var(--red-700);
  transform: none;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='9.5'/%3E%3Cpath d='m8 12.4 2.8 2.8 5.4-5.6'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='9.5'/%3E%3Cpath d='m8 12.4 2.8 2.8 5.4-5.6'/%3E%3C/svg%3E") center / contain no-repeat;
}
.legal-summary__list strong { color: var(--navy-900); }
.legal-summary__foot { margin: 1rem 0 0; font-size: .875rem; color: var(--text-muted); }

/* Controller identity */
.legal-identity {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0;
  margin: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface);
}
.legal-identity > div {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: .1rem;
  padding: .8rem 1.1rem;
  border-top: 1px solid var(--border);
}
.legal-identity > div:first-child { border-top: 0; }
@media (min-width: 560px) {
  .legal-identity > div { grid-template-columns: 11rem minmax(0, 1fr); gap: 1rem; align-items: baseline; }
}
.legal-identity dt { font-size: .8rem; font-weight: 600; letter-spacing: .04em; color: var(--text-muted); }
.legal-identity dd { margin: 0; font-weight: 500; color: var(--navy-900); overflow-wrap: anywhere; }
.legal-identity dd a { font-weight: 600; }
.legal-prose .legal-identity { max-width: none; }

/* ---------- Tables (stack into cards on small screens) ---------- */
.legal-table-wrap {
  max-width: none;
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  -webkit-overflow-scrolling: touch;
}
.legal-table { width: 100%; margin: 0; border-collapse: collapse; font-size: .9rem; line-height: 1.5; color: var(--ink-900); }
.legal-prose .legal-table th, .legal-prose .legal-table td, .legal-table th, .legal-table td {
  padding: .8rem 1rem;
  border: 0;
  border-top: 1px solid var(--border);
  text-align: left;
  vertical-align: top;
}
.legal-table thead th {
  border-top: 0;
  background: var(--navy-900);
  color: var(--cream-100);
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  white-space: nowrap;
}
.legal-table thead th:first-child { border-top-left-radius: calc(var(--radius) - 1px); }
.legal-table thead th:last-child { border-top-right-radius: calc(var(--radius) - 1px); }
.legal-table tbody th { font-weight: 650; color: var(--navy-900); background: transparent; }
.legal-table tbody tr:nth-child(even) { background: #FCF9F6; }
.legal-table col.w-14 { width: 14%; } .legal-table col.w-17 { width: 17%; } .legal-table col.w-18 { width: 18%; }
.legal-table col.w-20 { width: 20%; } .legal-table col.w-21 { width: 21%; } .legal-table col.w-22 { width: 22%; }
.legal-table col.w-24 { width: 24%; } .legal-table col.w-26 { width: 26%; } .legal-table col.w-28 { width: 28%; }
.legal-table col.w-30 { width: 30%; } .legal-table col.w-34 { width: 34%; } .legal-table col.w-38 { width: 38%; }
.legal-table col.w-40 { width: 40%; } .legal-table col.w-42 { width: 42%; } .legal-table col.w-52 { width: 52%; }
.legal-table tbody th code { white-space: normal; overflow-wrap: anywhere; }
.legal-table caption { padding: .85rem 1rem; caption-side: top; text-align: left; font-size: .875rem; font-weight: 600; color: var(--text-muted); }
.legal-table code { padding: .1em .35em; border-radius: 4px; background: var(--cream-200); font-family: var(--font-mono); font-size: .86em; white-space: nowrap; }
.legal-table .legal-basis { display: block; margin-top: .2rem; font-size: .82rem; color: var(--text-muted); }
.legal-table ul { margin: 0; padding-left: 1.1em; }
.legal-prose .legal-table ul > li::before { top: .62em; width: 5px; height: 5px; left: -1em; }
.legal-table li + li { margin-top: .2em; }
.legal-table .badge { white-space: nowrap; }
.tag-special {
  display: inline-block;
  padding: .02rem .45rem;
  border: 1px solid #EBC3C3;
  border-radius: 4px;
  background: #FBEFEF;
  color: var(--red-800);
  font-size: .74rem;
  font-weight: 650;
  letter-spacing: .02em;
  white-space: nowrap;
  vertical-align: .08em;
}

@media (max-width: 719.98px) {
  .legal-table-wrap { overflow: visible; border: 0; background: transparent; }
  .legal-table, .legal-table tbody, .legal-table tr, .legal-table th, .legal-table td { display: block; width: 100%; }
  .legal-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .legal-table caption { display: block; padding: 0 0 .6rem; }
  .legal-table tr {
    margin-top: 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface);
    overflow: hidden;
  }
  .legal-table tbody tr:nth-child(even) { background: var(--surface); }
  .legal-prose .legal-table th, .legal-prose .legal-table td, .legal-table th, .legal-table td { padding: .55rem .95rem; border-top: 0; }
  .legal-table tbody th { padding-top: .85rem; padding-bottom: .65rem; border-bottom: 1px solid var(--border); background: var(--cream-100); font-size: .95rem; }
  .legal-table td:last-child { padding-bottom: .85rem; }
  .legal-table td[data-label]::before {
    content: attr(data-label);
    display: block;
    margin-bottom: .1rem;
    font-size: .68rem;
    font-weight: 700;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--text-muted);
  }
}

/* ---------- Processing activity cards (aydınlatma) ---------- */
.legal-prose .process-list { display: grid; gap: 14px; max-width: none; padding: 0; list-style: none; counter-reset: proc; }
.legal-prose .process-list > li + li { margin-top: 0; }
.legal-prose .process {
  counter-increment: proc;
  position: relative;
  padding: 1.1rem 1.2rem 1.15rem 3.6rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}
.legal-prose .process::before {
  content: counter(proc);
  position: absolute;
  top: 1.05rem;
  left: 1.1rem;
  display: grid;
  place-items: center;
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 50%;
  background: var(--navy-900);
  color: var(--cream-50);
  font-size: .8rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.legal-prose .process--consent::before { background: var(--red-700); }
.legal-prose .process__title { margin: 0 0 .5rem; font-family: var(--font-body); font-size: 1rem; font-weight: 700; line-height: 1.4; letter-spacing: 0; color: var(--navy-900); }
.process__grid { display: grid; gap: .45rem; margin: 0; font-size: .9rem; line-height: 1.55; }
.process__grid > div { display: grid; grid-template-columns: minmax(0, 1fr); gap: .05rem; }
@media (min-width: 640px) {
  .process__grid > div { grid-template-columns: 8.75rem minmax(0, 1fr); gap: .9rem; }
}
.process__grid dt { font-size: .74rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--text-muted); padding-top: .15rem; }
.process__grid dd { margin: 0; color: var(--ink-900); }
.process__grid dd strong { color: var(--red-700); }
@media (max-width: 479.98px) {
  .legal-prose .process { padding: 1rem 1rem 1.05rem 1rem; }
  .legal-prose .process::before { position: static; display: inline-grid; margin-bottom: .55rem; }
}

/* ---------- Consent cards (açık rıza) ---------- */
.consent-doc { max-width: none; padding: 0; border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--surface); overflow: hidden; }
.consent-doc + .consent-doc { margin-top: 1.4rem; }
.consent-doc__head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: .6rem 1rem;
  padding: 1.05rem clamp(16px, 1rem + 1vw, 28px);
  border-bottom: 1px solid var(--border);
  background: var(--cream-100);
}
.consent-doc__title {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.12rem, 1.05rem + .35vw, 1.3rem);
  font-weight: 600;
  line-height: 1.3;
  color: var(--heading);
}
.legal-prose h2 + .consent-doc { margin-top: 1.1rem; }
.consent-doc__key { display: block; margin-bottom: .1rem; font-family: var(--font-body); font-size: .72rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--red-700); }
.consent-doc__body { padding: clamp(16px, 1rem + 1vw, 28px); }
.consent-doc .consent-doc__body > * + * { margin-top: 1rem; }
.consent-statement {
  position: relative;
  margin: 0;
  padding: 1rem 1.15rem 1rem 1.3rem;
  border-left: 3px solid var(--red-700);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  background: #FBF6F1;
  font-size: .98rem;
  line-height: 1.65;
  color: var(--navy-900);
}
.consent-statement__label { display: block; margin-bottom: .35rem; font-size: .7rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--text-muted); }
.consent-facts { display: grid; gap: 12px; margin: 0; }
@media (min-width: 720px) { .consent-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.consent-facts > div { padding: .85rem 1rem; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface); }
.consent-facts dt { margin-bottom: .25rem; font-size: .75rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--text-muted); }
.consent-facts dd { margin: 0; font-size: .92rem; line-height: 1.55; }
.consent-facts dd ul { margin: .2rem 0 0; padding-left: 1.1em; }
.legal-prose .consent-facts dd ul > li::before { top: .62em; width: 5px; height: 5px; left: -1em; }
.consent-facts dd li + li { margin-top: .15em; }
.consent-facts dd p { margin: .5rem 0 0; }
.consent-facts .is-wide { grid-column: 1 / -1; }

/* ---------- KVKK hub ---------- */
.kvkk-intro { display: grid; gap: clamp(24px, 1rem + 3vw, 56px); align-items: start; }
@media (min-width: 960px) { .kvkk-intro { grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); } }
.kvkk-intro__text > * + * { margin-top: 1rem; }
.kvkk-intro__text p { color: var(--ink-700); }
.kvkk-promise {
  margin: 0;
  padding: clamp(20px, 1rem + 1.5vw, 32px);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow);
}
.kvkk-promise__title { margin: 0 0 1rem; font-size: clamp(1.25rem, 1.15rem + .4vw, 1.45rem); }
.kvkk-promise__list { display: grid; gap: .95rem; margin: 0; padding: 0; list-style: none; }
.kvkk-promise__list li { display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: .9rem; align-items: start; font-size: .95rem; line-height: 1.55; color: var(--ink-700); }
.kvkk-promise__list strong { display: block; color: var(--navy-900); font-weight: 650; }
.kvkk-promise__icon { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 10px; background: var(--cream-200); color: var(--red-700); }
.kvkk-promise__icon .icon { width: 20px; height: 20px; }

.kvkk-docs { display: grid; gap: 16px; grid-template-columns: minmax(0, 1fr); margin: 0; padding: 0; list-style: none; }
@media (min-width: 640px) { .kvkk-docs { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1000px) { .kvkk-docs { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.kvkk-doc {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: .6rem;
  height: 100%;
  padding: clamp(20px, 1rem + 1vw, 28px);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  transition: transform .35s var(--ease), box-shadow .35s var(--ease), border-color .35s var(--ease);
}
.kvkk-doc::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  border-radius: var(--radius) var(--radius) 0 0;
  background: linear-gradient(90deg, var(--red-700), var(--brass-500));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .45s var(--ease);
}
.kvkk-doc:hover, .kvkk-doc:focus-within { transform: translateY(-3px); border-color: var(--brass-300); box-shadow: var(--shadow); }
.kvkk-doc:hover::before, .kvkk-doc:focus-within::before { transform: scaleX(1); }
.kvkk-doc__icon { display: grid; place-items: center; width: 48px; height: 48px; margin-bottom: .35rem; border-radius: 12px; background: var(--navy-900); color: var(--brass-300); }
.kvkk-doc__icon .icon { width: 22px; height: 22px; }
.kvkk-doc--accent .kvkk-doc__icon { background: var(--red-700); color: var(--cream-50); }
.kvkk-doc__title { margin: 0; font-size: clamp(1.15rem, 1.08rem + .3vw, 1.3rem); line-height: 1.3; }
.kvkk-doc__title a { color: inherit; text-decoration: none; }
.kvkk-doc__title a::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }
.kvkk-doc__title a:focus-visible { outline: none; }
.kvkk-doc:has(a:focus-visible) { outline: 2.5px solid var(--focus-ring); outline-offset: 3px; }
.kvkk-doc__text { margin: 0; font-size: .92rem; line-height: 1.6; color: var(--ink-700); }
.kvkk-doc__more { margin-top: auto; padding-top: .35rem; font-size: .875rem; font-weight: 600; color: var(--red-700); }
.kvkk-doc__more::after { content: " →"; transition: margin var(--dur) var(--ease); }
.kvkk-doc:hover .kvkk-doc__more::after { margin-left: 4px; }

.rights-grid { display: grid; gap: 14px; grid-template-columns: minmax(0, 1fr); margin: 0; padding: 0; list-style: none; counter-reset: none; }
@media (min-width: 640px) { .rights-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1000px) { .rights-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.right-item {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: .95rem;
  align-items: start;
  padding: 1.1rem 1.15rem;
  border: 1px solid rgba(244, 229, 222, .14);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, .04);
}
.right-item__letter {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 1.5px solid var(--brass-300);
  border-radius: 50%;
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--brass-300);
}
.right-item__text { margin: 0; padding-top: .45rem; font-size: .95rem; line-height: 1.55; color: var(--text); }
.rights-foot { max-width: 78ch; margin: 1.75rem 0 0; font-size: .9rem; line-height: 1.6; color: var(--text-muted); }

.selfservice { display: grid; gap: 16px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 760px) { .selfservice { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.selfservice__item {
  display: flex;
  flex-direction: column;
  gap: .5rem;
  padding: 1.35rem 1.35rem 1.4rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}
.selfservice__icon { display: grid; place-items: center; width: 44px; height: 44px; margin-bottom: .3rem; border-radius: 50%; background: var(--cream-200); color: var(--red-700); }
.selfservice__icon .icon { width: 21px; height: 21px; }
.selfservice__title { margin: 0; font-family: var(--font-body); font-size: 1.02rem; font-weight: 700; letter-spacing: 0; color: var(--navy-900); }
.selfservice__text { margin: 0; font-size: .9rem; line-height: 1.55; color: var(--ink-700); }
.selfservice-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px 24px;
  margin-top: 18px;
  padding: 1rem 1.25rem;
  border: 1px dashed #D3C2B4;
  border-radius: var(--radius);
  background: rgba(255, 255, 255, .6);
}
.selfservice-bar p { margin: 0; font-size: .92rem; color: var(--ink-700); }

.channels { display: grid; gap: 16px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 900px) { .channels { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.channel {
  display: flex;
  flex-direction: column;
  gap: .55rem;
  padding: clamp(20px, 1rem + 1vw, 28px);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}
.channel--primary { border-color: rgba(136, 1, 5, .35); box-shadow: 0 0 0 3px rgba(136, 1, 5, .06), var(--shadow-sm); }
.channel__step { font-size: .72rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--red-700); }
.channel__title { margin: 0; font-size: 1.2rem; }
.channel__text { margin: 0; font-size: .92rem; line-height: 1.6; color: var(--ink-700); }
.channel__value { margin: .2rem 0 0; font-weight: 600; color: var(--navy-900); overflow-wrap: anywhere; }
.channel .btn { align-self: flex-start; margin-top: auto; }
.channel > :last-child:not(.btn) { margin-top: auto; }

.controller-card {
  display: grid;
  gap: clamp(20px, 1rem + 2vw, 40px);
  align-items: center;
  padding: clamp(22px, 1rem + 2vw, 40px);
  border-radius: var(--radius-lg);
  background:
    radial-gradient(ellipse 60% 120% at 100% 0%, rgba(136, 1, 5, .35), transparent 60%),
    linear-gradient(160deg, var(--navy-900), var(--navy-950));
}
@media (min-width: 860px) { .controller-card { grid-template-columns: auto minmax(0, 1fr); } }
.controller-card__seal img { width: 104px; height: 104px; filter: drop-shadow(0 12px 24px rgba(0, 0, 0, .4)); }
.controller-card .legal-identity { border-color: rgba(244, 229, 222, .16); background: rgba(255, 255, 255, .04); }
.controller-card .legal-identity > div { border-color: rgba(244, 229, 222, .14); }
.controller-card .legal-identity dt { color: var(--text-muted); }
.controller-card .legal-identity dd { color: var(--cream-50); }
.controller-card__title { margin: 0 0 .9rem; font-size: clamp(1.35rem, 1.2rem + .6vw, 1.7rem); }

/* ---------- KVKK application page ---------- */
.apply-layout { display: grid; gap: clamp(24px, 1rem + 2.5vw, 48px); align-items: start; }
@media (min-width: 1000px) { .apply-layout { grid-template-columns: minmax(0, 1fr) 360px; } }
@media (min-width: 1200px) { .apply-layout { grid-template-columns: minmax(0, 1fr) 380px; } }
.apply-card {
  position: relative;
  min-width: 0;
  padding: clamp(20px, 1rem + 2.4vw, 48px);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow);
}
.apply-card::before {
  content: "";
  position: absolute;
  top: -1px;
  left: clamp(20px, 1rem + 2.4vw, 48px);
  width: 72px;
  height: 4px;
  border-radius: 0 0 4px 4px;
  background: linear-gradient(90deg, var(--red-700), var(--brass-500));
}
.apply-card__title { margin: 0 0 .4rem; font-size: clamp(1.5rem, 1.3rem + .8vw, 2rem); }
.apply-card__lead { margin: 0 0 1.5rem; color: var(--ink-700); max-width: 62ch; }
.apply-card .alert { margin-bottom: 0; }
.apply-form { gap: 1.35rem; }
.apply-form .field__counter { margin: 0; font-size: .78rem; color: var(--text-muted); text-align: right; font-variant-numeric: tabular-nums; }
.apply-form .field__counter.is-over { color: var(--danger); font-weight: 600; }
.apply-form .field__foot { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; }
.apply-form .field__foot .field__hint { flex: 1; }
.apply-form .ack {
  padding: 1rem 1.1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--cream-100);
}
.apply-form .ack .check { color: var(--ink-900); }
.apply-form .field.has-error .ack { border-color: var(--danger); background: #FFFBFB; }
.apply-form .form-actions { padding-top: 0; }
.apply-form .form-actions .btn { min-width: 220px; }
@media (max-width: 479.98px) { .apply-form .form-actions .btn { width: 100%; } }
.apply-form__error:empty { display: none; }
.identity-note { display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: .75rem; margin: 0; padding: .95rem 1.1rem; border: 1px solid #C9D6F5; border-radius: 10px; background: #EEF3FC; font-size: .9rem; line-height: 1.55; color: var(--ink-900); }
.identity-note .icon { width: 22px; height: 22px; color: var(--info); }
.identity-note--account { border-color: #BFE3CB; background: #EDF7F0; }
.identity-note--account .icon { color: var(--success); }
.identity-note p { margin: 0; }
.identity-note p + p { margin-top: .35rem; }

.apply-aside { display: grid; gap: 16px; min-width: 0; }
@media (min-width: 1000px) { .apply-aside { position: sticky; top: calc(var(--header-h) + 24px); } }
.aside-card { padding: 1.35rem 1.4rem; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.aside-card--navy { border: 0; background: linear-gradient(165deg, var(--navy-900), var(--navy-950)); }
.aside-card__title { margin: 0 0 .9rem; font-family: var(--font-body); font-size: .75rem; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--eyebrow); }
.aside-card p { margin: 0; font-size: .9rem; line-height: 1.6; color: var(--text-2); }
.aside-card p + p { margin-top: .6rem; }
.aside-card a { font-weight: 600; }

.steps { position: relative; display: grid; gap: 1.05rem; margin: 0; padding: 0; list-style: none; counter-reset: step; }
.steps li { counter-increment: step; position: relative; display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: .85rem; }
.steps li:not(:last-child)::after { content: ""; position: absolute; top: 28px; bottom: -1.05rem; left: 13px; width: 2px; background: rgba(244, 229, 222, .16); }
.steps li::before {
  content: counter(step);
  position: relative;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--navy-900);
  box-shadow: inset 0 0 0 1.5px var(--brass-300);
  color: var(--brass-300);
  font-size: .8rem;
  font-weight: 700;
}
.steps li:last-child::before { background: var(--red-700); box-shadow: none; color: #FFFFFF; }
.steps strong { display: block; font-size: .95rem; color: var(--cream-50); }
.steps span { display: block; font-size: .85rem; line-height: 1.5; color: var(--text-muted); }

.facts { display: grid; gap: .75rem; margin: 0; padding: 0; list-style: none; }
.facts li { display: grid; grid-template-columns: 20px minmax(0, 1fr); gap: .65rem; font-size: .9rem; line-height: 1.5; color: var(--ink-700); }
.facts .icon { width: 20px; height: 20px; margin-top: .1em; color: var(--red-700); }
.facts strong { color: var(--navy-900); }

/* Success panel */
.apply-success { text-align: center; padding: clamp(8px, 1vw, 16px) 0; }
.apply-success:focus { outline: none; }
.apply-success__icon { display: grid; place-items: center; width: 72px; height: 72px; margin: 0 auto 1.1rem; border-radius: 50%; background: #E3F4E8; color: var(--success); box-shadow: 0 0 0 10px rgba(21, 128, 61, .07); }
.apply-success__icon .icon { width: 34px; height: 34px; stroke-width: 2; }
.apply-success__title { margin: 0 0 .5rem; font-size: clamp(1.6rem, 1.35rem + 1vw, 2.2rem); }
.apply-success__lead { max-width: 52ch; margin: 0 auto; color: var(--ink-700); }
.reference {
  display: grid;
  gap: 0;
  max-width: 520px;
  margin: 1.75rem auto 0;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--cream-50);
  text-align: left;
  overflow: hidden;
}
@media (min-width: 560px) { .reference { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.reference > div { padding: 1rem 1.2rem; }
.reference > div + div { border-top: 1px solid var(--border); }
@media (min-width: 560px) { .reference > div + div { border-top: 0; border-left: 1px solid var(--border); } }
.reference dt { font-size: .72rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--text-muted); }
.reference dd { display: flex; align-items: center; gap: .5rem; margin: .3rem 0 0; font-size: 1.15rem; font-weight: 700; color: var(--navy-900); }
.reference__code { font-family: var(--font-mono); font-size: 1.05rem; letter-spacing: .02em; overflow-wrap: anywhere; }
.reference__copy { display: inline-grid; place-items: center; flex: none; width: 34px; height: 34px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); color: var(--navy-900); cursor: pointer; transition: border-color var(--dur) var(--ease), color var(--dur) var(--ease); }
.reference__copy:hover { border-color: var(--red-700); color: var(--red-700); }
.reference__copy .icon { width: 17px; height: 17px; }
.apply-success__next { max-width: 520px; margin: 1.5rem auto 0; padding: 0; list-style: none; text-align: left; }
.apply-success__actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 1.75rem; }

/* Written application */
.written { display: grid; gap: clamp(20px, 1rem + 2vw, 40px); align-items: start; }
@media (min-width: 960px) { .written { grid-template-columns: minmax(0, 1.2fr) minmax(0, .8fr); } }
.written__list { display: grid; gap: .55rem; margin: 1rem 0 0; padding: 0; list-style: none; counter-reset: wl; }
.written__list li { counter-increment: wl; display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: .7rem; font-size: .95rem; line-height: 1.55; color: var(--ink-700); }
.written__list li::before { content: counter(wl); display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--cream-200); color: var(--red-700); font-size: .8rem; font-weight: 700; }
.written__list strong { color: var(--navy-900); }
.envelope {
  position: relative;
  padding: 1.6rem 1.5rem 1.5rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background:
    repeating-linear-gradient(135deg, var(--red-700) 0 10px, transparent 10px 20px, var(--navy-900) 20px 30px, transparent 30px 40px) top / 100% 5px no-repeat,
    var(--surface);
  box-shadow: var(--shadow-sm);
}
.envelope__label { margin: 0 0 .7rem; font-size: .72rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--text-muted); }
.envelope address { font-size: 1.02rem; line-height: 1.6; color: var(--navy-900); }
.envelope address strong { display: block; font-family: var(--font-display); font-size: 1.2rem; font-weight: 600; }
.envelope__note { margin: 1rem 0 0; padding-top: .9rem; border-top: 1px dashed var(--border); font-size: .85rem; color: var(--text-muted); }

/* Small screens: compact document cards, full-width hero actions */
@media (max-width: 639.98px) {
  .kvkk-doc { display: grid; grid-template-columns: 44px minmax(0, 1fr); column-gap: 14px; row-gap: .3rem; align-content: start; }
  .kvkk-doc__icon { grid-row: 1 / span 3; width: 44px; height: 44px; margin: 0; }
  .kvkk-doc__title, .kvkk-doc__text, .kvkk-doc__more { grid-column: 2; }
  .kvkk-doc__more { padding-top: .15rem; }
  .selfservice__item { display: grid; grid-template-columns: 44px minmax(0, 1fr); column-gap: 14px; row-gap: .25rem; }
  .selfservice__icon { grid-row: 1 / span 2; margin: 0; }
}

/* Generic helpers for these pages */
.legal-lead-sm { font-size: .95rem; color: var(--ink-700); }
.link-button {
  display: inline;
  padding: 0;
  border: 0;
  background: none;
  color: var(--link);
  font: inherit;
  font-weight: 600;
  text-decoration: underline;
  text-decoration-color: rgba(136, 1, 5, .35);
  text-underline-offset: .2em;
  cursor: pointer;
}
.link-button:hover { color: var(--link-hover); text-decoration-color: currentColor; }
[data-setting-show-empty][hidden] { display: none !important; }

/* ---------- Print ---------- */
@media print {
  .legal-aside, .legal-meta .icon, .apply-aside, .apply-form, .selfservice-bar, [data-print-hide] { display: none !important; }
  .legal-layout { display: block; }
  .legal-section { padding: 0 !important; }
  .legal-paper, .apply-card { padding: 0; border: 0; box-shadow: none; }
  .legal-paper::before, .apply-card::before { display: none; }
  .legal-meta li { border: 0; padding: 0; background: none; }
  .legal-prose { font-size: 10.5pt; line-height: 1.5; }
  .legal-prose > :is(p, ul, ol, h2, h3, h4, dl) { max-width: none; }
  .legal-prose h2 { margin-top: 16pt; padding-top: 8pt; }
  .legal-table thead th { background: #EEEEEE !important; color: #000000 !important; }
  .legal-table tr, .process, .consent-doc, .legal-summary { break-inside: avoid; }
  .legal-table-wrap, .legal-summary, .process, .consent-doc, .consent-statement { border-color: #BBBBBB !important; background: none !important; }
  .process::before { background: none !important; color: #000000 !important; border: 1px solid #000000; }
  .kvkk-doc, .right-item, .channel, .selfservice__item { break-inside: avoid; box-shadow: none !important; }
  .controller-card { background: none !important; padding: 0; }
  .controller-card * { color: #000000 !important; }
}
