/* gfixer.tools: flat, hairline borders, square corners. */
:root {
  --bg: #ffffff;
  --surface: #f7f7f5;
  --ink: #141414;
  --muted: #5f6368;
  --line: #dcdcd8;
  --accent: #1a66d6;
  --accent-ink: #ffffff;
  --error: #b3261e;
  --warn: #8a5a00;
  --max: 920px;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #111213;
    --surface: #1a1b1d;
    --ink: #ececea;
    --muted: #a3a6ab;
    --line: #313337;
    --accent: #5b9cff;
    --accent-ink: #0b0c0d;
    --error: #ff8a80;
    --warn: #f0c050;
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.6 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
a { color: var(--accent); text-underline-offset: 2px; }
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 16px; }
.muted { color: var(--muted); }
.small { font-size: 13px; color: var(--muted); }

.top { border-bottom: 1px solid var(--line); }
.top .wrap { display: flex; align-items: center; justify-content: space-between; height: 56px; }
.brand { color: var(--ink); text-decoration: none; font-weight: 700; letter-spacing: -0.01em; display: flex; align-items: center; }
.brand .tld { color: var(--muted); font-weight: 500; }
.brand .mark { width: 14px; height: 14px; background: var(--accent); display: inline-block; margin-right: 8px; }
.top nav { display: flex; gap: 20px; }
.top nav a { color: var(--ink); text-decoration: none; font-size: 15px; }
.top nav a:hover { color: var(--accent); }

.hero { padding: 48px 0 24px; }
.hero h1 { font-size: clamp(30px, 5vw, 44px); line-height: 1.12; letter-spacing: -0.02em; margin: 0 0 12px; max-width: 760px; }
.lede { font-size: 18px; color: var(--muted); max-width: 680px; margin: 0; }
.crumb { font-size: 14px; color: var(--muted); margin: 0 0 12px; }
.crumb a { color: var(--muted); }

h2 { font-size: 22px; letter-spacing: -0.01em; margin: 40px 0 12px; }
h3 { font-size: 17px; margin: 28px 0 8px; }

.cards { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.card a { display: flex; flex-direction: column; gap: 6px; padding: 20px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); text-decoration: none; height: 100%; }
.card a:hover { border-color: var(--ink); }
.card .app { font-size: 12px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); }
.card .name { font-weight: 650; font-size: 18px; }
.card .blurb { color: var(--muted); font-size: 15px; }

.panel { display: block; border: 1px solid var(--line); background: var(--surface); padding: 20px; }
.tool label { display: block; margin-bottom: 10px; }
.row { display: flex; gap: 8px; flex-wrap: wrap; }
.row input { flex: 1 1 280px; min-width: 0; }
input[type="url"] { font: inherit; padding: 11px 12px; border: 1px solid var(--line); background: var(--bg); color: var(--ink); border-radius: 0; }
input[type="url"]:focus { outline: 2px solid var(--accent); outline-offset: -1px; }
.btn { font: inherit; font-weight: 600; padding: 10px 16px; border: 1px solid var(--line); background: var(--bg); color: var(--ink); cursor: pointer; border-radius: 0; }
.btn:hover { border-color: var(--ink); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn.primary:hover { filter: brightness(1.08); }
.btn:disabled { opacity: 0.6; cursor: progress; }

.or { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 14px; margin: 16px 0; }
.or::before, .or::after { content: ""; flex: 1; border-top: 1px solid var(--line); }

label.drop { text-align: center; cursor: pointer; border-style: dashed; padding: 28px 20px; display: flex; flex-direction: column; align-items: center; gap: 6px; }
.drop:hover, .drop.over { border-color: var(--accent); }
.drop.busy { opacity: 0.7; cursor: progress; }
.drop .muted { font-size: 14px; max-width: 560px; }
.icon { width: 28px; height: 28px; fill: none; stroke: var(--muted); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }

.status { min-height: 1.6em; margin: 14px 0 0; font-size: 15px; color: var(--muted); }
.status.error { color: var(--error); }
.status.warn { color: var(--warn); }

.results-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-top: 24px; }
.results-head h2 { margin: 0; }
.grid { list-style: none; padding: 0; margin: 16px 0 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; }
.grid li { border: 1px solid var(--line); display: flex; flex-direction: column; }
.thumb { aspect-ratio: 4 / 3; display: flex; align-items: center; justify-content: center; background: repeating-conic-gradient(var(--surface) 0 25%, var(--bg) 0 50%) 0 0 / 16px 16px; color: var(--muted); font-size: 13px; overflow: hidden; }
.thumb img { max-width: 100%; max-height: 100%; object-fit: contain; display: block; }
.meta { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 10px; border-top: 1px solid var(--line); font-size: 13px; color: var(--muted); }
.meta span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.meta .btn { padding: 6px 10px; font-size: 13px; flex: none; }
.next { margin-top: 16px; border: 1px solid var(--line); padding: 14px 16px; display: flex; flex-direction: column; gap: 2px; font-size: 15px; }

.prose > * { max-width: 720px; }
.prose p, .steps li { color: var(--ink); }
.steps { padding-left: 20px; }
.steps li { margin: 8px 0; }

.faq { padding-bottom: 24px; }
.faq > * { max-width: 720px; }
.faq details { border-top: 1px solid var(--line); padding: 12px 0; }
.faq details:last-of-type { border-bottom: 1px solid var(--line); }
.faq summary { cursor: pointer; font-weight: 600; }
.faq p { margin: 8px 0 0; color: var(--muted); }

.foot { border-top: 1px solid var(--line); margin-top: 56px; padding: 24px 0 40px; font-size: 15px; }
.foot p { margin: 4px 0; }

/* Google Drive tools (Sheets on mobile, AI for Slides, Drive pick in Doc images) */
.drive-panel, .step { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.drive-panel > div, .step > div:first-child { display: flex; flex-direction: column; gap: 2px; flex: 1 1 320px; }
.drive-panel .muted, .step .muted { font-size: 14px; }
.step + .step, .step + .small + .step { margin-top: 12px; }
#signed-in { margin: 0 0 12px; }
.linkish { font: inherit; background: none; border: 0; padding: 0; color: var(--accent); text-decoration: underline; text-underline-offset: 2px; cursor: pointer; }

.tabs { display: flex; gap: 6px; overflow-x: auto; margin: 16px 0 0; padding-bottom: 2px; -webkit-overflow-scrolling: touch; }
.tab { flex: none; font: inherit; font-size: 14px; padding: 6px 12px; border: 1px solid var(--line); background: var(--bg); color: var(--muted); cursor: pointer; border-radius: 0; }
.tab.on { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.controls { margin: 12px 0 0; align-items: stretch; }
.controls input[type="search"] { flex: 1 1 200px; min-width: 0; font: inherit; padding: 9px 12px; border: 1px solid var(--line); background: var(--bg); color: var(--ink); border-radius: 0; }
.controls input[type="search"]:focus { outline: 2px solid var(--accent); outline-offset: -1px; }
.seg { display: inline-flex; border: 1px solid var(--line); }
.seg button { font: inherit; font-size: 14px; padding: 0 14px; border: 0; background: var(--bg); color: var(--muted); cursor: pointer; }
.seg button + button { border-left: 1px solid var(--line); }
.seg button.on { background: var(--surface); color: var(--ink); font-weight: 600; }
#count { margin: 10px 0; }
#more { margin-top: 12px; }

.rowcards { display: grid; gap: 10px; }
.rowcard { border: 1px solid var(--line); padding: 12px 14px; }
.rowcard .title { font-weight: 650; margin-bottom: 6px; word-break: break-word; }
.rowcard dl { margin: 0; display: grid; grid-template-columns: minmax(90px, 36%) 1fr; gap: 4px 12px; font-size: 15px; }
.rowcard dt { color: var(--muted); word-break: break-word; }
.rowcard dd { margin: 0; word-break: break-word; }
.table-wrap { overflow: auto; border: 1px solid var(--line); max-height: 70vh; }
table.sheet { border-collapse: collapse; font-size: 14px; min-width: 100%; }
table.sheet th, table.sheet td { border-bottom: 1px solid var(--line); border-right: 1px solid var(--line); padding: 7px 10px; text-align: left; vertical-align: top; white-space: nowrap; max-width: 320px; overflow: hidden; text-overflow: ellipsis; }
table.sheet thead th { position: sticky; top: 0; background: var(--surface); z-index: 2; }
table.sheet td:first-child, table.sheet th:first-child { position: sticky; left: 0; background: var(--bg); z-index: 1; }
table.sheet thead th:first-child { background: var(--surface); z-index: 3; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0 16px; }
.chip { font: inherit; font-size: 14px; padding: 7px 12px; border: 1px solid var(--line); background: var(--bg); color: var(--ink); cursor: pointer; border-radius: 0; text-align: left; }
.chip:hover { border-color: var(--ink); }
.chip:disabled { opacity: 0.5; cursor: progress; }
.ask { display: flex; flex-direction: column; gap: 8px; }
.ask textarea { font: inherit; padding: 10px 12px; border: 1px solid var(--line); background: var(--bg); color: var(--ink); border-radius: 0; resize: vertical; width: 100%; }
.ask textarea:focus { outline: 2px solid var(--accent); outline-offset: -1px; }
.answer { margin-top: 16px; border: 1px solid var(--line); background: var(--surface); padding: 16px; white-space: pre-wrap; word-break: break-word; line-height: 1.65; }

@media (max-width: 600px) {
  .rowcard dl { grid-template-columns: 1fr; gap: 0; }
  .rowcard dd { margin-bottom: 6px; }
}
