/*
Theme Name: 9 Minimal Study
Theme URI: https://3.mysummer.cc/
Author: Codex
Description: A very minimal personal study and second-brain theme for 9's learning site.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.9
Requires PHP: 8.0
Text Domain: nine-study-minimal
*/

@font-face {
  font-family: "Moon Stars Kai";
  src: url("assets/fonts/MoonStarsKai-Regular.ttf") format("truetype");
  font-display: swap;
  font-weight: 400;
  font-style: normal;
}

:root {
  --bg: #14241c;
  --text: #d8c68a;
  --muted: #9e9b76;
  --line: #2b3d32;
  --accent: #c9d59a;
  --max: 760px;
  --font-kai: "Moon Stars Kai", "Kaiti SC", "STKaiti", "KaiTi", serif;
  --font-sans: var(--font-kai);
  --font-reading: var(--font-kai);
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
}

body {
  min-height: 100%;
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-kai);
  font-size: 16px;
  line-height: 1.8;
  letter-spacing: 0;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a {
  color: inherit;
  text-decoration-color: rgba(79, 122, 94, 0.35);
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
}

a:hover {
  color: var(--accent);
  text-decoration-color: var(--accent);
}

.site {
  width: min(var(--max), calc(100vw - 40px));
  margin: 0 auto;
  padding: 72px 0 48px;
}

.site-header {
  display: flex;
  justify-content: center;
  gap: 24px;
  align-items: center;
  padding-bottom: 28px;
  text-align: center;
}

.brand {
  font-size: 22px;
  font-family: var(--font-kai);
  font-weight: 400;
  line-height: 1.2;
  text-decoration: none;
}

.top-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  color: var(--muted);
  font-size: 14px;
}

.top-nav a {
  text-decoration: none;
}

.eyebrow {
  margin: 0 0 16px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero h1 {
  max-width: 680px;
  margin: 0;
  font-size: clamp(38px, 7vw, 72px);
  line-height: 1.08;
  font-weight: 760;
  letter-spacing: 0;
}

.intro {
  max-width: 620px;
  margin: 0 auto;
  color: var(--text);
  font-family: var(--font-kai);
  font-size: 15px;
  line-height: 1.5;
  text-align: center;
}

.intro-login {
  text-decoration: none;
}

.hero .note-meta {
  margin: 0;
  line-height: 1.5;
}

.quiet-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 10px 22px;
  margin: 34px 0 0;
  padding: 18px 0;
  border-top: 1px solid var(--line);
  list-style: none;
  color: var(--muted);
  text-align: center;
}

.quiet-links a {
  color: var(--text);
  font-family: var(--font-kai);
  font-weight: 400;
}

.section {
  margin-top: 72px;
  padding-top: 32px;
  border-top: 1px solid var(--line);
}

.section h2 {
  margin: 0 0 22px;
  font-size: 18px;
  line-height: 1.4;
}

.note-list {
  display: grid;
  gap: 18px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.note-title {
  display: inline;
  font-family: var(--font-kai);
  font-size: 16px;
  font-weight: 400;
}

.note-meta {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 14px;
}

.note-subtitle {
  max-width: 640px;
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.65;
}

.archive-header {
  margin-bottom: 28px;
}

.archive-list {
  gap: 22px;
}

.archive-item {
  padding-bottom: 20px;
  border-bottom: 1px solid var(--line);
}

.archive-item-head {
  display: flex;
  align-items: baseline;
  gap: 10px;
}

.archive-item-head input {
  appearance: none;
  width: 14px;
  height: 14px;
  flex: 0 0 auto;
  transform: translateY(1px);
  border: 1px solid var(--accent);
  border-radius: 3px;
  background: var(--bg);
  opacity: 0.86;
}

.archive-item-head input:hover,
.archive-item-head input:checked {
  opacity: 1;
}

.archive-item-head input:checked::after {
  content: "";
  display: block;
  width: 6px;
  height: 6px;
  margin: 3px;
  background: var(--accent);
}

.bulk-actions:not(.is-digesting) .bulk-actions-bar,
.bulk-actions:not(.is-digesting) .digest-checkbox {
  display: none;
}

.admin-message {
  margin: 10px 0 0;
  color: var(--accent);
  font-size: 14px;
}

.bulk-actions {
  margin: 0;
}

.digest-toggle {
  appearance: none;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  color: var(--text);
  cursor: pointer;
  font: inherit;
  font-size: 13px;
  line-height: 1;
  margin: 0 0 18px;
  padding: 7px 12px;
}

.digest-toggle:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.bulk-actions-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin: 0 0 24px;
  padding: 0 0 18px;
  border-bottom: 1px solid var(--line);
}

.admin-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
}

.admin-actions button,
.bulk-actions-bar button {
  appearance: none;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  color: var(--text);
  cursor: pointer;
  font: inherit;
  font-size: 13px;
  line-height: 1;
  padding: 7px 12px;
}

.admin-actions button:hover,
.bulk-actions-bar button:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.admin-actions button.danger:hover,
.bulk-actions-bar button.danger:hover {
  border-color: #9d3028;
  color: #9d3028;
}

.admin-status {
  color: var(--muted);
  font-size: 13px;
}

.empty {
  margin: 0;
  color: var(--muted);
}

.footer {
  margin-top: 80px;
  color: var(--muted);
  font-size: 13px;
}

.entry {
  max-width: 720px;
}

.entry h1 {
  margin: 0 0 10px;
  font-family: var(--font-kai);
  font-size: 22px;
  line-height: 1.35;
  font-weight: 400;
}

.entry-subtitle {
  max-width: 660px;
  margin: 0 0 30px;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.75;
}

.entry-content {
  color: var(--text);
  font-family: var(--font-reading);
  font-size: 17px;
  line-height: 1.9;
}

.entry-content p {
  margin: 0 0 1.2em;
}

.entry-content img {
  max-width: 100%;
  height: auto;
}

@media (max-width: 680px) {
  .site {
    width: min(100% - 28px, var(--max));
    padding-top: 38px;
  }

  .site-header {
    display: block;
    padding-bottom: 44px;
  }

  .top-nav {
    margin-top: 18px;
  }

  .intro {
    font-size: 15px;
  }

  .section {
    margin-top: 56px;
  }
}
