:root { color-scheme: light; font-family: "Segoe UI", system-ui, sans-serif; color: #25352d; background: #f7f7f2; --green: #2d5b43; --muted: #70796e; --line: #dce1d5; }
* { box-sizing: border-box; }
body { margin: 0; }
a { color: inherit; text-decoration: none; }
button, input, textarea { font: inherit; }
button, .button { cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 20px; border: 1px solid var(--green); border-radius: 9px; padding: 12px 20px; background: var(--green); color: #fff; font-size: .9rem; font-weight: 600; }
button:hover, .button:hover { background: #214532; }
button:disabled { opacity: .45; cursor: default; }
.button-secondary { background: transparent; color: var(--green); border-color: var(--line); }
.button-secondary:hover { background: #eaf0e3; }
.button-quiet { background: none; color: var(--muted); border-color: transparent; font-weight: 400; }
.button-quiet:hover { background: #e9eee3; }
.site-header { min-height: 88px; padding: 16px max(28px, calc((100vw - 1240px) / 2)); border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 48px; background: #fbfcf7; }
.brand { display: inline-flex; align-items: center; font-size: 1.45rem; font-weight: 750; letter-spacing: -.8px; }
.brand-mark { width: 31px; height: 34px; display: grid; place-items: center; background: var(--green); color: #f4f6e9; border-radius: 8px 8px 2px 8px; font-family: Georgia, serif; font-style: italic; font-size: 1.4rem; margin-right: 10px; }
.brand-dot, .heading-dot { color: #7b945b; }
.primary-nav { display: flex; gap: 6px; }
.primary-nav a { padding: 10px 18px; border-radius: 7px; font-size: .9rem; color: #65715e; }
.primary-nav a[aria-current="page"] { background: #e9efdf; color: #324d2d; font-weight: 600; }
.primary-nav a:hover { background: #edf0e7; }
.private-label { margin-left: auto; font-size: .76rem; color: var(--muted); }
main { max-width: 1296px; margin: auto; padding: 24px 28px 0; }
h1 { font-family: Georgia, "Times New Roman", serif; font-size: clamp(2.3rem, 4.4vw, 3.75rem); line-height: 1.12; letter-spacing: -2px; font-weight: 400; margin: 12px 0 14px; }
h2 { font-size: 1.15rem; font-weight: 600; letter-spacing: -.4px; }
p { line-height: 1.65; }
.eyebrow, .step-label { font-size: .67rem; font-weight: 700; letter-spacing: 2px; text-transform: uppercase; color: #6a7c53; }
.eyebrow { margin: 0; }
.muted { color: var(--muted); font-size: .9rem; }
.page-heading { display: flex; justify-content: space-between; gap: 24px; align-items: center; padding: 14px 0 30px; }
.page-heading .muted { margin: 0; }
.heading-actions { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }
.notice { white-space: pre-wrap; overflow-wrap: anywhere; font-size: .9rem; margin: 0 0 16px; padding: 12px 16px; border-radius: 8px; background: #eaf0e1; }
.notice:empty { display: none; }
form { display: grid; gap: 20px; }
label { display: grid; gap: 8px; font-size: .82rem; font-weight: 600; }
input, textarea { width: 100%; min-width: 0; color: #25352d; background: #fdfefa; padding: 13px 14px; border: 1px solid #d5dccd; border-radius: 8px; font-size: .9rem; font-weight: 400; }
input::placeholder, textarea::placeholder { color: #8b9484; }
textarea { resize: vertical; line-height: 1.65; }
:focus-visible { outline: 3px solid #91a66b; outline-offset: 3px; }
.search-toolbar { grid-template-columns: minmax(0, 1fr) minmax(160px, 260px) auto; align-items: end; gap: 16px; background: #fff; border: 1px solid var(--line); padding: 20px; border-radius: 12px; }
.search-toolbar label > span { font-size: .72rem; font-weight: 600; color: var(--muted); }
.search-toolbar button { min-height: 46px; }
.results-heading { display: flex; align-items: center; justify-content: space-between; margin: 28px 0 16px; }
.results-heading h2, .results-heading p { margin: 0; }
.results-heading p { font-size: .76rem; }
.link-grid { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.link-card { border: 1px solid var(--line); border-radius: 12px; background: #fff; padding: 24px; display: flex; flex-direction: column; min-height: 285px; box-shadow: 0 2px 3px #283b2403; }
.card-source { display: flex; gap: 10px; align-items: center; margin-bottom: 22px; min-width: 0; }
.domain-mark { display: grid; place-items: center; flex-shrink: 0; width: 32px; height: 32px; border: 1px solid #dce4d2; border-radius: 9px; background: #f0f4e9; color: #55713d; font-family: Georgia, serif; font-size: 1rem; text-transform: uppercase; }
.domain { font-size: .74rem; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.link-card:nth-child(3n+2) .domain-mark { background: #f7f0e7; border-color: #eadfce; color: #8a7356; }
.link-card:nth-child(3n+3) .domain-mark { background: #edf1f6; border-color: #dce3eb; color: #607d98; }
.link-card h3 { font-size: 1.12rem; line-height: 1.5; letter-spacing: -.4px; font-weight: 600; margin: 0 0 10px; overflow-wrap: anywhere; }
.link-card h3 a { display: flex; justify-content: space-between; gap: 12px; }
.link-card h3 a:hover { color: #588342; text-decoration: underline; text-underline-offset: 4px; }
.open-arrow { flex-shrink: 0; color: #8f9a85; font-weight: 400; }
.notes { white-space: pre-wrap; overflow-wrap: anywhere; color: #747e70; font-size: .83rem; margin: 0 0 18px; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; margin: auto 0 18px; padding-top: 10px; }
.tag { color: #5d7051; background: #f0f4e9; border-radius: 5px; padding: 4px 8px; font-size: .65rem; overflow-wrap: anywhere; max-width: 100%; }
.card-date { font-size: .67rem; color: #8c9585; margin: 0; border-top: 1px solid #edf0e8; padding-top: 14px; }
.warning { font-size: .73rem; color: #907144; background: #fcf7ec; padding: 8px 10px; border-radius: 5px; margin: 0 0 14px; }
.empty-state { grid-column: 1 / -1; padding: 65px 24px; text-align: center; color: var(--muted); border: 1px dashed #cad4bf; border-radius: 12px; }
.pagination { margin: 28px 0; display: flex; align-items: center; justify-content: space-between; gap: 12px; font-size: .8rem; color: var(--muted); }
.site-footer { display: flex; justify-content: space-between; gap: 20px; border-top: 1px solid var(--line); padding: 24px 0; margin-top: 48px; color: #8a9480; font-size: .68rem; }
.add-layout { display: grid; grid-template-columns: 280px minmax(0, 1fr); gap: 64px; align-items: start; padding-top: 12px; }
.add-aside { padding: 28px 0; }
.aside-number { font-size: .65rem; letter-spacing: 2px; color: #82916f; }
.add-aside h2 { font-family: Georgia, serif; font-weight: 400; font-size: 2rem; line-height: 1.3; margin: 22px 0 18px; }
.add-aside p { font-size: .88rem; color: var(--muted); }
.aside-tip { border-top: 1px solid var(--line); margin: 30px 0; padding-top: 22px; }
.aside-tip strong { font-size: .8rem; }
.aside-tip p { font-size: .8rem; }
.text-link { color: var(--green); font-size: .82rem; font-weight: 600; text-decoration: underline; text-underline-offset: 4px; }
.add-panel { background: white; padding: 36px; border: 1px solid var(--line); border-radius: 14px; }
.form-heading h2 { font-size: 1.4rem; margin: 10px 0 0; }
.form-heading .muted { margin: 8px 0 26px; }
.field-hint { color: var(--muted); font-size: .75rem; margin: 10px 0 0; }
.optional { font-size: .71rem; color: #87917d; font-weight: 400; }
.form-divider { border-top: 1px solid var(--line); margin: 30px 0 4px; padding-top: 24px; font-size: .61rem; letter-spacing: 1.6px; color: #869276; }
.form-actions { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 8px; }
#batch-preview { padding-left: 24px; margin: 0; }
#batch-preview li { padding: 20px 0; border-top: 1px solid var(--line); }
#batch-preview label { margin-bottom: 14px; }
.batch-status { font-size: .8rem; color: #61764b; white-space: pre-wrap; overflow-wrap: anywhere; }
#batch-form { margin-top: 26px; }
.login-panel { max-width: 540px; padding: 44px; margin: 48px auto 80px; background: white; border: 1px solid var(--line); border-radius: 16px; }
.login-panel h1 { font-size: 2.75rem; }
.login-panel form { margin-top: 30px; }
[hidden] { display: none !important; }
@media (max-width: 1020px) {
  .link-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .private-label { display: none; }
  .site-header { justify-content: space-between; gap: 20px; }
  .add-layout { grid-template-columns: 220px minmax(0, 1fr); gap: 32px; }
}
@media (max-width: 680px) {
  .site-header { min-height: 74px; padding: 16px; gap: 12px; flex-wrap: wrap; }
  .brand { font-size: 1.2rem; }
  .brand-mark { width: 26px; height: 28px; font-size: 1.15rem; margin-right: 7px; }
  .primary-nav a { padding: 9px 11px; font-size: .8rem; }
  main { padding: 24px 16px 0; }
  h1 { letter-spacing: -1.2px; }
  .page-heading { align-items: flex-start; flex-direction: column; padding-bottom: 24px; }
  .heading-actions { align-self: stretch; justify-content: space-between; }
  .search-toolbar { grid-template-columns: 1fr auto; padding: 16px; gap: 12px; }
  .search-field { grid-column: 1 / -1; }
  .link-grid { grid-template-columns: minmax(0, 1fr); gap: 14px; }
  .link-card { min-height: 240px; padding: 22px; }
  .add-layout { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  .add-aside { padding: 0; }
  .add-aside h2, .add-aside > p, .aside-tip, .aside-number { display: none; }
  .add-panel { padding: 24px 18px; }
  .site-footer { flex-direction: column; gap: 8px; }
  .login-panel { margin: 20px auto; padding: 28px 22px; }
  .login-panel h1 { font-size: 2.4rem; }
}
