/* Authors (/author) -- built on styles.css variables so it reads as the same site. */
.au-body [hidden] { display: none !important; }
.au-body { background: var(--paper-alt); min-height: 100vh; }
.au-navright { display: flex; gap: 12px; align-items: center; margin-left: auto; font-size: var(--fs-xs); color: var(--muted); }
.au-navright .btn { padding: 8px 16px; font-size: var(--fs-xs); }
.au-muted { color: var(--muted); }
.au-hint { color: var(--faint); font-size: var(--fs-xs); margin: 6px 0 0; }
.btn-link { background: none; border: none; color: var(--brand); font: inherit; font-weight: 700; cursor: pointer; padding: 0; }
.btn-link:hover { color: var(--red); }
.au-danger { color: var(--red); margin-top: 18px; }

/* gate */
.au-gate { padding: 120px 0 60px; }
.au-gate-inner { max-width: 1040px; margin: 0 auto; padding: 0 24px; display: grid; grid-template-columns: 1fr 440px; gap: 48px; align-items: start; }
.au-gate-side h1 { font-size: var(--fs-d2, 40px); color: var(--brand-deep); margin: 0 0 14px; }
.au-gate-side p { font-size: var(--fs-lg); line-height: 1.6; }
.au-card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 30px; }
.au-card h2 { font-size: var(--fs-d4, 24px); color: var(--ink); margin: 0 0 14px; }
.au-panel .btn-primary { width: 100%; justify-content: center; margin-top: 8px; }
.au-label { display: block; font-weight: 700; font-size: var(--fs-xs); color: var(--ink); margin: 14px 0 6px; }
.au-input { width: 100%; box-sizing: border-box; font: inherit; font-size: var(--fs-sm); padding: 11px 13px; border: 1.5px solid var(--line-strong); border-radius: var(--radius-sm); background: #fff; color: var(--text); }
.au-input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
textarea.au-input { resize: vertical; line-height: 1.5; }
.au-code { font-family: var(--mono); letter-spacing: .2em; font-size: 20px; text-align: center; }
.au-msg { min-height: 1.2em; font-size: var(--fs-xs); margin: 10px 0 0; }
.au-msg.err { color: var(--red); }
.au-msg.ok { color: #0f766e; }
.au-alt { display: flex; flex-direction: column; gap: 10px; margin-top: 16px; align-items: stretch; text-align: center; }
.au-alt .btn { justify-content: center; }
.au-or { color: var(--faint); font-size: var(--fs-xs); }
.au-choices { display: grid; gap: 10px; margin-top: 10px; }
.au-choice { text-align: left; background: var(--paper); border: 1.5px solid var(--line-strong); border-radius: var(--radius-sm); padding: 14px 16px; cursor: pointer; font: inherit; transition: border-color .15s, box-shadow .15s; }
.au-choice:hover { border-color: var(--brand); box-shadow: var(--shadow-sm); }
.au-choice-t { display: block; font-weight: 800; color: var(--brand-deep); }
.au-choice-d { display: block; color: var(--muted); font-size: var(--fs-xs); margin-top: 4px; line-height: 1.45; }

/* app */
.au-app { padding: 104px 0 60px; }
.au-tabs { display: inline-flex; gap: 6px; background: var(--paper); border: 1px solid var(--line); border-radius: 999px; padding: 4px; margin-bottom: 22px; }
.au-tab { font: inherit; font-weight: 700; font-size: 13px; padding: 8px 18px; border: none; border-radius: 999px; background: none; color: var(--muted); cursor: pointer; }
.au-tab[aria-selected="true"] { background: var(--brand-soft); color: var(--brand-deep); }
.au-head { display: flex; justify-content: space-between; gap: 16px; align-items: flex-end; flex-wrap: wrap; margin-bottom: 16px; }
.au-head h1 { font-size: 30px; color: var(--brand-deep); margin: 0; }
.au-head p { margin: 4px 0 0; }
.au-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.au-actions .btn { padding: 10px 18px; font-size: var(--fs-xs); }
.au-filter { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 12px; }
.au-filter button { font: inherit; font-size: 13px; font-weight: 700; padding: 6px 14px; border-radius: 999px; border: 1px solid var(--line-strong); background: var(--paper); color: var(--muted); cursor: pointer; }
.au-filter button[aria-pressed="true"] { border-color: var(--brand); color: var(--brand-deep); background: var(--brand-soft); }
.au-table-card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); overflow-x: auto; }
.au-table { width: 100%; border-collapse: collapse; font-size: 14px; min-width: 760px; }
.au-table th { text-align: left; font-size: 11px; letter-spacing: .05em; text-transform: uppercase; color: var(--faint); background: var(--paper-alt); padding: 11px 14px; border-bottom: 1px solid var(--line-strong); }
.au-table td { padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.au-table td.act { text-align: right; white-space: nowrap; }
.au-table tr:hover td { background: var(--paper-alt); }
.au-table .t { font-weight: 700; color: var(--ink); }
.au-empty { padding: 26px; color: var(--muted); text-align: center; margin: 0; }
.au-pill { display: inline-block; font-size: 11px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; padding: 3px 9px; border-radius: 999px; background: var(--paper-alt-2); color: var(--muted); }
.au-pill.published { background: #dcfce7; color: #166534; }
.au-pill.review { background: #fef3c7; color: #92400e; }

/* editor */
.au-ed-grid { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 22px; align-items: start; }
.au-ed-main, .au-ed-side { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); padding: 22px; }
.au-ed-side { position: sticky; top: 92px; }
.au-ed-side .au-label:first-child { margin-top: 0; }
.au-drop { border: 1.5px dashed var(--line-strong); border-radius: var(--radius-sm); padding: 14px 16px; font-size: var(--fs-xs); color: var(--muted); background: var(--paper-alt); transition: border-color .15s, background .15s; }
.au-drop.over { border-color: var(--brand); background: var(--brand-soft); }
.au-file { font-size: inherit; }
.au-title { font-size: 24px; font-weight: 800; color: var(--brand-deep); }
.au-toolbar { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; margin: 16px 0 0; padding: 6px; border: 1.5px solid var(--line-strong); border-bottom: none; border-radius: var(--radius-sm) var(--radius-sm) 0 0; background: var(--paper-alt); position: sticky; top: 72px; z-index: 2; }
.au-toolbar button, .au-toolbar select, .au-tb-file { font: inherit; font-size: 13px; padding: 5px 10px; border: 1px solid transparent; border-radius: 6px; background: none; color: var(--ink); cursor: pointer; }
.au-toolbar button:hover, .au-tb-file:hover { background: var(--paper); border-color: var(--line-strong); }
.au-toolbar select { border-color: var(--line-strong); background: #fff; }
.au-sep { width: 1px; height: 20px; background: var(--line-strong); margin: 0 4px; }
.au-editor { min-height: 420px; border: 1.5px solid var(--line-strong); border-radius: 0 0 var(--radius-sm) var(--radius-sm); padding: 18px 22px; background: #fff; outline: none; overflow-wrap: anywhere; }
.au-editor:focus { border-color: var(--brand); }
.au-editor:empty::before { content: attr(data-placeholder); color: var(--faint); }
.au-editor img { max-width: 100%; height: auto; }
.au-accents { display: flex; gap: 8px; }
.au-accents button { width: 28px; height: 28px; border-radius: 50%; border: 3px solid #fff; box-shadow: 0 0 0 1px var(--line-strong); cursor: pointer; }
.au-accents button[aria-pressed="true"] { box-shadow: 0 0 0 2px var(--ink); }

/* security */
.au-sec-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; }
.au-sec { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); padding: 20px 22px; }
.au-sec h3 { margin: 0 0 6px; font-size: 17px; color: var(--ink); }
.au-sec p { font-size: var(--fs-xs); color: var(--muted); margin: 0 0 12px; line-height: 1.5; }
.au-sec ul { list-style: none; padding: 0; margin: 0 0 12px; }
.au-sec li { display: flex; justify-content: space-between; gap: 10px; padding: 8px 0; border-top: 1px solid var(--line); font-size: var(--fs-xs); }
.au-sec .btn { padding: 8px 16px; font-size: var(--fs-xs); }

/* modal + preview */
.au-modal { position: fixed; inset: 0; background: rgba(20,22,58,.45); display: flex; align-items: center; justify-content: center; z-index: 50; padding: 20px; }
.au-modal-box { background: var(--paper); border-radius: var(--radius); box-shadow: var(--shadow-lg); width: min(520px, 100%); max-height: 90vh; overflow: auto; padding: 22px 24px; }
.au-modal-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.au-modal-head h3 { margin: 0; color: var(--brand-deep); }
.au-x { background: none; border: none; font-size: 26px; cursor: pointer; color: var(--muted); }
.au-modal-box .btn-primary { margin-top: 14px; }
.au-qr { display: flex; justify-content: center; margin: 10px 0; }
.au-qr svg { width: 200px; height: 200px; }
.au-codes { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; font-family: var(--mono); background: var(--paper-alt); padding: 12px; border-radius: var(--radius-sm); margin: 10px 0; }
.au-secret { font-family: var(--mono); background: var(--paper-alt); padding: 6px 10px; border-radius: 6px; word-break: break-all; }
.au-preview { position: fixed; inset: 0; background: #fff; z-index: 40; overflow: auto; }
.au-preview-bar { position: sticky; top: 0; display: flex; justify-content: space-between; align-items: center; padding: 10px 24px; background: var(--brand-deep); color: #fff; font-weight: 700; font-size: var(--fs-xs); z-index: 1; }
.au-preview-bar .btn { color: #fff; border-color: rgba(255,255,255,.5); }
.au-preview .article-wrap { padding-top: 40px; }

@media (max-width: 900px) {
  .au-gate-inner, .au-ed-grid { grid-template-columns: 1fr; }
  .au-ed-side { position: static; }
}
