/* CV Tayyar site styles. System fonts only; nothing loaded from other sites. */
:root {
  --bg: #f5f3ee;
  --surface: #ffffff;
  --ink: #1d2433;
  --muted: #4a5468;
  --brand: #2b3a67;
  --brand-2: #3d5291;
  --brand-soft: #e6eaf6;
  --accent: #d9822b;
  --focus: #b35c00;
  --line: #d6d1c4;
  --field: #77756f;
  --danger: #a12828;
  --warn-bg: #fff3e2;
  --warn-line: #b35c00;
  --tip-bg: #eef1fa;
  --radius: 10px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", "Helvetica Neue", Arial, sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--font); font-size: 1rem; line-height: 1.6; }
img, svg { max-width: 100%; }
a { color: var(--brand-2); text-underline-offset: 2px; }
a:hover { color: var(--brand); }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
main:focus { outline: none; }
h1, h2, h3 { line-height: 1.25; color: var(--brand); }
h1 { font-size: clamp(1.6rem, 4.5vw, 2.3rem); margin: 1.25rem 0 .5rem; letter-spacing: -.01em; }
h2 { font-size: clamp(1.25rem, 3.2vw, 1.55rem); margin: 2rem 0 .5rem; }
h3 { font-size: 1.1rem; margin: 1.25rem 0 .4rem; }
code { font-size: .95em; background: var(--brand-soft); padding: .05em .3em; border-radius: 4px; overflow-wrap: anywhere; }

.wrap { max-width: 72rem; margin: 0 auto; padding: 0 16px; }
.prose { max-width: 46rem; }
.prose-wide { max-width: 72rem; }
.lede { font-size: 1.1rem; color: var(--muted); }
.lede p { margin: .5rem 0; }
.skip { position: absolute; left: 8px; top: -60px; background: var(--brand); color: #fff; padding: .6rem 1rem; border-radius: 6px; z-index: 10; }
.skip:focus { top: 8px; }
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* Header and footer */
.site-header { background: var(--surface); border-bottom: 1px solid var(--line); }
.header-in { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .25rem 1rem; padding-top: .4rem; padding-bottom: .4rem; }
.brand { display: inline-flex; align-items: center; gap: .55rem; text-decoration: none; color: var(--brand); min-height: 44px; }
.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-name { font-weight: 800; font-size: 1.2rem; letter-spacing: .01em; }
.brand-tag { font-size: .8rem; color: var(--muted); }
.nav { display: flex; flex-wrap: wrap; gap: 0 .15rem; list-style: none; margin: 0; padding: 0; }
.nav a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 .6rem; border-radius: 6px; text-decoration: none; color: var(--ink); font-weight: 600; }
.nav a:hover { background: var(--brand-soft); }
.nav a[aria-current="page"] { color: var(--brand); box-shadow: inset 0 -3px 0 var(--focus); }
.site-footer { margin-top: 3rem; background: var(--brand); color: #f3f4fa; }
.footer-in { padding-top: 1.5rem; padding-bottom: 1.5rem; font-size: .95rem; }
.footer-in p { margin: .4rem 0; }
.footer-links { display: flex; flex-wrap: wrap; gap: 0 1rem; list-style: none; margin: 0 0 .5rem; padding: 0; }
.footer-links a { display: inline-flex; align-items: center; min-height: 44px; color: #fff; font-weight: 600; }
.site-footer :focus-visible { outline-color: #ffffff; }

/* Buttons and form controls */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .4rem; min-height: 44px; padding: .45rem .95rem; border: 1px solid var(--brand); border-radius: 8px; background: var(--surface); color: var(--brand); font: inherit; font-weight: 600; text-decoration: none; cursor: pointer; text-align: center; }
.btn:hover { background: var(--brand-soft); color: var(--brand); }
.btn-primary { background: var(--brand); color: #fff; }
.btn-primary:hover { background: #1f2b4f; color: #fff; }
.btn-danger { border-color: var(--danger); color: var(--danger); }
.btn-danger:hover { background: #fbecec; color: var(--danger); }
.btn-small { font-size: .95rem; }
.btn[disabled] { opacity: .55; cursor: not-allowed; }
.btn-row { display: flex; flex-wrap: wrap; gap: .5rem; }
label { font-weight: 600; }
input[type="text"], input[type="email"], input[type="tel"], input[type="url"], select, textarea {
  width: 100%; min-height: 44px; padding: .5rem .65rem; border: 1px solid var(--field); border-radius: 6px;
  background: #fff; color: var(--ink); font: inherit; font-size: 1rem;
}
textarea { line-height: 1.45; resize: vertical; }
select { width: auto; min-width: 9rem; }
input[disabled] { background: #eeece6; color: #5d5d5d; }
.field { margin-top: .8rem; }
.field > label { display: block; }
.hint { font-size: .92rem; color: var(--muted); margin: .15rem 0 .35rem; }
.field-warn { margin: .35rem 0 0; padding: .45rem .7rem; font-size: .92rem; background: var(--warn-bg); border-left: 4px solid var(--warn-line); border-radius: 0 6px 6px 0; }
.field-warn:empty { display: none; }
.check { display: flex; align-items: center; gap: .55rem; min-height: 44px; }
.check input { width: 22px; height: 22px; margin: 0; flex-shrink: 0; accent-color: var(--brand); }
.notice { background: var(--warn-bg); border: 1px solid #e3bb86; border-radius: 8px; padding: .7rem 1rem; }
.status { min-height: 1.6em; margin: .5rem 0; font-weight: 600; color: var(--brand); }

/* Builder */
.intro { padding-bottom: .25rem; }
.intro h1 { margin-top: 1rem; }
.intro .lede { margin: .25rem 0 .75rem; }
.builder { max-width: 92rem; margin: 0 auto; padding: 0 16px; }
.toolbar { display: flex; flex-wrap: wrap; align-items: flex-end; gap: .6rem .8rem; padding: .75rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.tool { display: flex; flex-direction: column; gap: .15rem; }
.tool label { font-size: .9rem; }
.menu > summary { list-style: none; }
.menu > summary::-webkit-details-marker { display: none; }
.menu > summary::after { content: "\25BE"; font-size: .8em; }
.menu[open] { flex-basis: 100%; }
.menu-body { display: grid; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); gap: .5rem; margin-top: .6rem; padding: .75rem; border: 1px solid var(--line); border-radius: 8px; background: #fbfaf7; }
.menu-body .hint { grid-column: 1 / -1; margin: 0; }
.sr-only:focus-visible + .file-btn { outline: 3px solid var(--focus); outline-offset: 2px; }
.plain-wrap { margin: .5rem 0 1rem; }
.plain-wrap textarea { font-family: ui-monospace, Consolas, monospace; font-size: .9rem; }
.view-switch { display: flex; gap: .5rem; margin: .5rem 0 .75rem; }
.view-switch .btn { flex: 1; }
.view-switch .btn[aria-pressed="true"] { background: var(--brand); color: #fff; }
.panes { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1.25rem; }
.builder[data-view="edit"] .pane-preview { display: none; }
.builder[data-view="preview"] .pane-edit { display: none; }
.pane-h { margin: .25rem 0 .75rem; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: .85rem 1rem; }
.draft-card { margin-bottom: .9rem; }
.draft-card .hint { margin: .1rem 0; }
.editor { margin: 0; }
.ed-sec { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: .75rem; }
.ed-sec > summary { display: flex; align-items: center; gap: .5rem; min-height: 50px; padding: .6rem 1rem; cursor: pointer; font-weight: 700; color: var(--brand); }
.ed-sec > summary::marker { color: var(--focus); }
.sum-title { font-size: 1.05rem; }
.count { font-weight: 600; font-size: .85rem; color: var(--muted); }
.sec-body { padding: 0 1rem 1rem; }
.sec-body > .hint:first-child { margin-top: 0; }
.entries { display: grid; gap: .75rem; margin: .75rem 0; }
.entries:empty { margin: 0; }
.entry { border: 1px solid var(--line); border-radius: 8px; padding: .25rem .85rem .85rem; margin: 0; min-width: 0; background: #fcfbf8; }
.entry > legend { font-weight: 700; padding: 0 .35rem; color: var(--ink); max-width: 100%; overflow-wrap: anywhere; }
.entry .field:first-of-type { margin-top: .35rem; }
.entry-tools { display: flex; flex-wrap: wrap; gap: .45rem; margin-top: .8rem; }
.entry-tools .btn { min-width: 44px; }
.pair { display: grid; gap: 0 .75rem; grid-template-columns: minmax(0, 1fr); }
fieldset.sub { border: 1px solid var(--line); border-radius: 8px; margin: 1rem 0 0; padding: .25rem .85rem .85rem; min-width: 0; }
fieldset.sub > legend { font-weight: 700; padding: 0 .35rem; }
.order-list { list-style: none; padding: 0; margin: .75rem 0 0; display: grid; gap: .4rem; }
.order-list li { display: flex; align-items: center; justify-content: space-between; gap: .5rem; padding: .3rem .3rem .3rem .75rem; border: 1px solid var(--line); border-radius: 8px; background: #fcfbf8; }
.order-list .btn-row { flex-wrap: nowrap; }

.preview-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 0 1rem; }
.preview-head .hint { margin: 0; }
.preview-frame { background: #dcd7cb; border-radius: var(--radius); padding: 10px; overflow: hidden; }
.preview-scaler { width: 210mm; transform-origin: 0 0; }
.preview-scaler .sheet { box-shadow: 0 1px 4px rgba(0, 0, 0, .18); }
.checks { margin-top: 1rem; }
.checks h3 { margin-top: 0; }
.checks-list { list-style: none; padding: 0; margin: .5rem 0 0; display: grid; gap: .5rem; }
.checks-list li { padding: .6rem .85rem; border-left: 4px solid var(--brand-2); background: var(--tip-bg); border-radius: 0 8px 8px 0; }
.checks-list li.warn { border-left-color: var(--warn-line); background: var(--warn-bg); }
.checks-list .lvl { font-weight: 700; margin-right: .3rem; }
.checks-list li.ok { border-left-color: #2f6b3b; background: #ecf6ee; }

.home-more { margin-top: 2.5rem; }
.steps { padding-left: 1.3rem; }
.steps li { margin: .4rem 0; }
.card-list { list-style: none; padding: 0; display: grid; gap: .8rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 19rem), 1fr)); }
.card-list h2, .card-list h3 { margin: .1rem 0 .35rem; font-size: 1.1rem; }
.card-list h2 a, .card-list h3 a, .related a { display: inline-flex; align-items: center; min-height: 44px; }
.related li { margin: .1rem 0; }
.card-list p { margin: 0; color: var(--muted); }

/* Guides and content pages */
.crumbs { margin: 1rem 0 0; font-size: .95rem; }
.crumbs a { display: inline-flex; align-items: center; min-height: 44px; }
.guide h1 { margin-top: .25rem; }
.limits { background: var(--warn-bg); border-left: 4px solid var(--warn-line); padding: .7rem 1rem; border-radius: 0 8px 8px 0; }
.toc { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: .25rem 1rem .75rem; margin: 1.25rem 0; }
.toc h2 { font-size: 1.05rem; margin: .75rem 0 .25rem; }
.toc ol { margin: 0; padding-left: 1.25rem; }
.toc li { margin: 0; }
.toc a { display: inline-flex; align-items: center; min-height: 44px; }
.prose ul, .prose ol { padding-left: 1.3rem; }
.prose li { margin: .3rem 0; }
.spaced li { margin: .6rem 0; }
.cite { font-size: .9rem; color: var(--muted); }
.example { background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--accent); border-radius: 0 8px 8px 0; padding: .6rem 1rem; margin: 1rem 0; }
.example p { margin: .35rem 0; }
.ex-label { display: inline-block; min-width: 5.5rem; font-size: .78rem; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; }
.ex-weak .ex-label { color: #8a2424; }
.ex-strong .ex-label { color: #1f5f36; }
.ex-note { font-size: .9rem; color: var(--muted); }
.verb-grid { display: grid; gap: .25rem 1rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 14rem), 1fr)); }
.verb-grid h3 { margin: .75rem 0 .1rem; font-size: 1rem; }
.verb-grid p { margin: 0; }
.checklist li { margin: .45rem 0; }
.table-wrap { overflow-x: auto; margin: 1rem 0; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); }
table { border-collapse: collapse; width: 100%; font-size: .95rem; }
caption { text-align: left; font-weight: 700; padding: .6rem .75rem; color: var(--brand); }
th, td { text-align: left; vertical-align: top; padding: .55rem .75rem; border-top: 1px solid var(--line); }
thead th { background: var(--brand-soft); }
tbody th { font-weight: 600; }
.sources { margin-top: 2.5rem; padding-top: .5rem; border-top: 2px solid var(--line); }
.sources li { margin: .5rem 0; font-size: .95rem; overflow-wrap: anywhere; }
.reviewed { font-size: .92rem; color: var(--muted); }
.try { margin: 2rem 0 1rem; }
.contact-line { font-size: 1.15rem; overflow-wrap: anywhere; }
.clear-card { margin: 1rem 0; }
.clear-card h3 { margin-top: .25rem; }

/* Templates and samples */
.tpl-list { list-style: none; padding: 0; display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 19rem), 1fr)); }
.tpl-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: .75rem 12px 1rem; min-width: 0; }
.tpl-card h2 { margin: .25rem 0 .75rem; }
.mini { --s: .34; width: calc(210mm * var(--s)); height: calc(297mm * var(--s)); overflow: hidden; margin: 0 auto .5rem; border: 1px solid var(--line); box-shadow: 0 1px 4px rgba(0, 0, 0, .12); background: #fff; }
.mini .sheet { transform: scale(var(--s)); transform-origin: 0 0; }
.sample-block { margin-top: 2rem; }
.sample-layout { display: grid; gap: 1rem; grid-template-columns: minmax(0, 1fr); align-items: start; }
.sheet--fluid { box-shadow: 0 1px 4px rgba(0, 0, 0, .15); border-radius: 4px; }
.sample-notes { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: .25rem 1rem 1rem; }

@media (max-width: 959px) {
  /* Keep the first form fields above the fold on phones. */
  .brand-tag { display: none; }
  .nav a { padding: 0 .45rem; }
  .intro h1 { font-size: 1.45rem; margin: .75rem 0 .25rem; }
  .intro .lede { font-size: 1rem; margin: 0 0 .5rem; }
  .toolbar { padding: .5rem; gap: .5rem; }
  .builder[data-view="edit"] .toolbar .tool { display: none; }
  .toolbar > .btn, .menu:not([open]) { flex: 1 1 9rem; }
  .menu:not([open]) > summary { width: 100%; }
  .status:empty { min-height: 0; margin: .25rem 0; }
  .view-switch { margin: .25rem 0 .6rem; }
  .pane-edit > .pane-h { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .draft-card { padding: .4rem .85rem; }
  #draft-state:empty { display: none; }
  .intro .lede { line-height: 1.45; }
}
@media (min-width: 420px) {
  .mini { --s: .37; }
}
@media (min-width: 560px) {
  .pair { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
}
@media (min-width: 960px) {
  .view-switch { display: none; }
  .panes { grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); align-items: start; }
  .builder[data-view] .pane-preview, .builder[data-view] .pane-edit { display: block; }
  .pane-preview { position: sticky; top: .5rem; max-height: calc(100vh - 1rem); overflow: auto; padding-right: 2px; }
}
@media (min-width: 1100px) {
  .sample-layout { grid-template-columns: minmax(0, 210mm) minmax(15rem, 1fr); }
  .sample-notes { position: sticky; top: 1rem; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
@media print {
  .site-header, .site-footer, .skip { display: none !important; }
  body { background: #fff; }
}
