:root {
  --bg: #faf7f2;
  --surface: #ffffff;
  --text: #1d1b18;
  --muted: #6b665e;
  --line: #e7e1d7;
  --accent: #2f6b4f;
  --accent-text: #ffffff;
  --warn: #b4531a;
  --bad: #a83232;
  --good: #2f6b4f;
  --chip: #f1ece3;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #161513;
    --surface: #1f1d1a;
    --text: #efebe4;
    --muted: #a39d93;
    --line: #34302b;
    --accent: #6fbf95;
    --accent-text: #0f1a14;
    --warn: #e39a62;
    --bad: #e07a7a;
    --good: #6fbf95;
    --chip: #2a2723;
  }
}
:root[data-theme="dark"] {
  --bg: #161513; --surface: #1f1d1a; --text: #efebe4; --muted: #a39d93; --line: #34302b;
  --accent: #6fbf95; --accent-text: #0f1a14; --warn: #e39a62; --bad: #e07a7a; --good: #6fbf95; --chip: #2a2723;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 15px/1.55 Inter, system-ui, sans-serif;
}
a { color: var(--accent); }
h1, h2, h3 { font-family: Fraunces, Georgia, serif; font-weight: 600; line-height: 1.2; }
h1 { font-size: 2rem; margin: 0 0 .5rem; }
h2 { font-size: 1.35rem; margin: 2rem 0 .75rem; }

.top {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  max-width: 880px; margin: 0 auto; padding: 1rem 16px;
}
.brand { font-family: Fraunces, Georgia, serif; font-size: 1.25rem; color: var(--text); text-decoration: none; }
nav { display: flex; gap: 1rem; align-items: center; flex-wrap: wrap; font-size: .95rem; }
nav a { color: var(--muted); text-decoration: none; }
nav a:hover, nav a.on { color: var(--text); }
.dot { display: inline-block; min-width: 1.2em; padding: 0 .35em; border-radius: 1em; background: var(--warn); color: #fff; font-size: .75rem; text-align: center; }

main { max-width: 880px; margin: 0 auto; padding: 0 16px 4rem; }

.hero { padding: 2rem 0 1rem; }
.hero p { color: var(--muted); max-width: 60ch; font-size: 1.05rem; }
.rules { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: .75rem; margin: 1.5rem 0; }
.rule { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: .9rem 1rem; }
.rule b { display: block; font-size: 1.4rem; font-family: Fraunces, Georgia, serif; }
.rule span { color: var(--muted); font-size: .9rem; }

.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: 12px;
  padding: 1rem 1.1rem; margin-bottom: .75rem;
}
a.card { display: block; color: inherit; text-decoration: none; }
a.card:hover { border-color: var(--muted); }
.row { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; flex-wrap: wrap; }
.title { font-weight: 600; font-size: 1.05rem; }
.muted { color: var(--muted); }
.small { font-size: .88rem; }

.badge { display: inline-flex; gap: .35em; align-items: center; padding: .15em .6em; border-radius: 1em; background: var(--chip); font-size: .82rem; white-space: nowrap; }
.badge.good { color: var(--good); }
.badge.bad { color: var(--bad); }
.badge.warn { color: var(--warn); }

form { display: grid; gap: .9rem; max-width: 520px; }
label { display: grid; gap: .3rem; font-weight: 500; font-size: .92rem; }
input, textarea, select {
  font: inherit; color: var(--text); background: var(--surface);
  border: 1px solid var(--line); border-radius: 8px; padding: .6rem .7rem; width: 100%;
}
textarea { min-height: 7rem; resize: vertical; }
button, .btn {
  font: inherit; font-weight: 600; cursor: pointer; border: 1px solid var(--accent);
  background: var(--accent); color: var(--accent-text); border-radius: 8px; padding: .55rem 1rem;
  text-decoration: none; display: inline-block;
}
button.ghost { background: transparent; color: var(--text); border-color: var(--line); }
button.danger { background: transparent; color: var(--bad); border-color: var(--bad); }
button:disabled { opacity: .5; cursor: default; }
.actions { display: flex; gap: .5rem; flex-wrap: wrap; margin-top: .75rem; }
.seg { display: flex; gap: .5rem; }
.seg label { flex: 1; display: flex; align-items: center; gap: .5rem; border: 1px solid var(--line); border-radius: 8px; padding: .6rem .7rem; background: var(--surface); cursor: pointer; }
.seg input { width: auto; }

.error { color: var(--bad); }
.notice { background: var(--chip); border-radius: 10px; padding: .75rem 1rem; margin: 1rem 0; }
.desc { white-space: pre-wrap; }

.timeline { list-style: none; padding: 0; margin: 0; border-left: 2px solid var(--line); }
.timeline li { padding: 0 0 1rem 1rem; position: relative; }
.timeline li::before { content: ""; position: absolute; left: -6px; top: .45em; width: 10px; height: 10px; border-radius: 50%; background: var(--line); }
.timeline li.late::before { background: var(--bad); }
.timeline li.ok::before { background: var(--good); }
.quote { border-left: 3px solid var(--line); padding-left: .75rem; margin: .35rem 0 0; color: var(--muted); white-space: pre-wrap; }

.templates { display: flex; flex-wrap: wrap; gap: .4rem; }
.templates button { font-weight: 400; font-size: .82rem; padding: .3rem .6rem; background: var(--chip); color: var(--text); border-color: var(--line); }

.notif { padding: .75rem 0; border-bottom: 1px solid var(--line); }
.notif.unread { font-weight: 500; }

.linkedin { background: #0a66c2; border-color: #0a66c2; color: #fff; }
.or { margin: 0; }
.brand { display: flex; flex-direction: column; line-height: 1.15; }
.tagline { font-family: Inter, system-ui, sans-serif; font-size: .8rem; color: var(--muted); }

.hr-head { display: flex; gap: .9rem; align-items: center; }
.avatar { width: 56px; height: 56px; border-radius: 50%; flex: none; object-fit: cover; display: inline-flex; align-items: center; justify-content: center; background: var(--accent); color: var(--accent-text); font-weight: 600; font-size: 1.1rem; }
.hr .badge { margin-top: .35rem; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: .75rem; margin-top: 1rem; padding-top: 1rem; border-top: 1px solid var(--line); }
.stats b { display: block; font-family: Fraunces, Georgia, serif; font-size: 1.3rem; }
.stats span { color: var(--muted); font-size: .82rem; }

.legal { max-width: 720px; }
.legal h2 { font-size: 1.15rem; margin-top: 1.75rem; }
.legal li { margin-bottom: .4rem; }
.site-foot { max-width: 880px; margin: 0 auto; padding: 1.5rem 16px 2.5rem; border-top: 1px solid var(--line); color: var(--muted); font-size: .85rem; display: flex; gap: 1rem; flex-wrap: wrap; }
.site-foot a { color: var(--muted); }
