/* Layout: one calm column, a wide chat with its "Τι κάνω τώρα" panel beside it.
   Large type and large targets throughout: the client is not at home with
   technology, so everything is visible, labelled with words, and big. */
:root {
  --scale: 1;
  --bg: #f4f6f7;
  --surface: #ffffff;
  --ink: #12222b;
  --muted: #4b5d66;
  --line: #c9d3d8;
  --accent: #0e5b66;
  --accent-ink: #ffffff;
  --accent-soft: #e3f0f1;
  --cite: #0b4f58;
  --ok: #1d6b3a;
  --ok-soft: #e5f3ea;
  --err: #a32019;
  --err-soft: #fbeceb;
  --focus: #f0b429;
  --radius: 12px;
  --font: "Segoe UI", "Noto Sans", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: calc(20px * var(--scale));
}
body[data-font="-1"] { --scale: .9; }
body[data-font="1"] { --scale: 1.12; }
body[data-font="2"] { --scale: 1.25; }
body[data-font="3"] { --scale: 1.4; }
:root:has(body[data-font="-1"]) { font-size: 18px; }
:root:has(body[data-font="1"]) { font-size: 22.4px; }
:root:has(body[data-font="2"]) { font-size: 25px; }
:root:has(body[data-font="3"]) { font-size: 28px; }

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; }
body { background: var(--bg); color: var(--ink); font: 1rem/1.6 var(--font); -webkit-text-size-adjust: 100%; }
a { color: var(--accent); text-underline-offset: .18em; }
h1 { font-size: 1.6rem; line-height: 1.25; margin: .2rem 0 .4rem; text-wrap: balance; }
h2 { font-size: 1.2rem; line-height: 1.3; margin: 0 0 .7rem; }
p { margin: 0 0 .8rem; }
.lead { color: var(--muted); font-size: 1.05rem; max-width: 46rem; }
.quiet { color: var(--muted); }
.small { font-size: .85rem; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.sel { user-select: all; font-weight: 600; }
.skip { position: absolute; left: -999px; top: 0; background: var(--surface); padding: .6rem 1rem; z-index: 10; }
.skip:focus { left: 1rem; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }

/* header */
.top { background: var(--surface); border-bottom: 1px solid var(--line); }
.top-in, .tabs-in, .page, .foot-in { max-width: 72rem; margin: 0 auto; padding-left: max(16px, env(safe-area-inset-left)); padding-right: max(16px, env(safe-area-inset-right)); }
.top-in { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; padding-block: .7rem; }
.brand { font-weight: 700; font-size: 1.15rem; color: var(--ink); text-decoration: none; }
.top-actions { display: flex; gap: .5rem; flex-wrap: wrap; align-items: center; }
.font { display: flex; gap: .35rem; }
.inline { display: inline; margin: 0; }
.tabs { border-top: 1px solid var(--line); }
.tabs-in { display: flex; gap: .2rem; overflow-x: auto; }
.tab { display: inline-flex; align-items: center; min-height: 3.1rem; padding: 0 1rem; font-weight: 600; color: var(--muted); text-decoration: none; border-bottom: 4px solid transparent; white-space: nowrap; }
.tab:hover { color: var(--ink); }
.tab.is-active { color: var(--ink); border-bottom-color: var(--accent); }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .4rem; min-height: 2.8rem; padding: .45rem 1.1rem; border-radius: var(--radius); border: 2px solid var(--line); background: var(--surface); color: var(--ink); font: 600 1rem/1.2 var(--font); text-decoration: none; cursor: pointer; }
.btn:hover { border-color: var(--accent); }
.btn-main { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn-main:hover { filter: brightness(1.08); }
.btn-quiet { background: transparent; }
.btn-quiet.is-active { border-color: var(--accent); }
.btn-wide { width: 100%; }
.btn[disabled] { opacity: .6; cursor: progress; }

.page { padding-block: 1.6rem 3rem; }
.block { margin-top: 2rem; }
.count { color: var(--muted); font-weight: 400; font-size: .9rem; }
.crumbs { margin-bottom: .4rem; }
.foot { border-top: 1px solid var(--line); color: var(--muted); font-size: .85rem; }
.foot-in { padding-block: 1rem; }

.msg { padding: .8rem 1rem; border-radius: var(--radius); border: 2px solid; }
.msg-ok { background: var(--ok-soft); border-color: var(--ok); }
.msg-err { background: var(--err-soft); border-color: var(--err); }

/* home */
.big-actions { display: grid; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); gap: 1rem; margin-top: 1.2rem; }
.action { display: flex; flex-direction: column; gap: .35rem; padding: 1.3rem 1.3rem 1.4rem; min-height: 8rem; background: var(--surface); border: 2px solid var(--line); border-radius: var(--radius); text-decoration: none; color: var(--ink); }
.action:hover { border-color: var(--accent); }
.action-title { font-size: 1.25rem; font-weight: 700; color: var(--accent); }
.action-text { color: var(--muted); }
.list { margin: 0; padding-left: 1.2rem; display: grid; gap: .55rem; }
.examples li { max-width: 50rem; }

/* cards */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(17rem, 1fr)); gap: .9rem; }
.card { display: flex; flex-direction: column; gap: .3rem; padding: 1rem 1.1rem; background: var(--surface); border: 2px solid var(--line); border-radius: var(--radius); text-decoration: none; color: var(--ink); min-width: 0; }
.card:hover { border-color: var(--accent); }
.card-type { font-size: .78rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
.card-title { font-weight: 700; font-size: 1.05rem; line-height: 1.3; }
.card-text { color: var(--muted); font-size: .92rem; overflow-wrap: anywhere; }

/* login */
.login-body { min-height: 100vh; display: grid; place-items: start center; padding: 8vh 16px 3rem; }
.login { width: 100%; max-width: 30rem; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 2rem 1.6rem; }
.stack { display: grid; gap: .5rem; }
.stack label { font-weight: 600; margin-top: .4rem; }
input[type=email], input[type=password], input[type=search], textarea { width: 100%; font: 1rem/1.5 var(--font); padding: .7rem .85rem; border: 2px solid var(--line); border-radius: var(--radius); background: var(--surface); color: var(--ink); min-height: 3rem; }
input:focus, textarea:focus { border-color: var(--accent); outline: none; box-shadow: 0 0 0 3px var(--accent-soft); }
.check { display: flex; gap: .6rem; align-items: center; font-weight: 400 !important; margin: .4rem 0 .8rem; }
.check input { width: 1.4rem; height: 1.4rem; }
.hint { color: var(--muted); font-size: .9rem; margin-top: 1.2rem; }

/* chat */
.chat { display: grid; grid-template-columns: minmax(0, 1fr) 19rem; gap: 1.4rem; align-items: start; }
.chat-main { min-width: 0; }
.messages { display: grid; grid-template-columns: minmax(0, 1fr); gap: .9rem; }
.msg-row { display: flex; }
.msg-row.user { justify-content: flex-end; }
.bubble { max-width: min(46rem, 100%); padding: .85rem 1.1rem .5rem; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); overflow-wrap: anywhere; min-width: 0; }
.msg-row.user .bubble { background: var(--accent-soft); border-color: #b6d7da; }
.msg-row.notice .bubble { background: #fff8e6; border-color: #e7cf8a; }
.bubble p:last-of-type { margin-bottom: .4rem; }
.bubble ul, .bubble ol { padding-left: 1.3rem; }
.bubble table, .prose table { border-collapse: collapse; display: block; overflow-x: auto; max-width: 100%; }
.bubble th, .bubble td, .prose th, .prose td { border: 1px solid var(--line); padding: .35rem .6rem; text-align: left; vertical-align: top; }
.when { display: block; font-size: .78rem; color: var(--muted); text-align: right; }
.cite { color: var(--cite); font-weight: 600; }
.ext { font-size: .8em; }
.files { display: flex; flex-wrap: wrap; gap: .6rem; margin: .4rem 0; }
.live { border-style: dashed; }
.empty { padding: 1.2rem; background: var(--surface); border: 1px dashed var(--line); border-radius: var(--radius); color: var(--muted); }
.older { text-align: center; }
.suggest { display: flex; flex-wrap: wrap; gap: .5rem; margin: 1.1rem 0 .7rem; }
.chip { font: 600 .92rem/1.25 var(--font); min-height: 2.6rem; padding: .4rem .95rem; border-radius: 1.3rem; border: 2px solid var(--line); background: var(--surface); color: var(--ink); cursor: pointer; white-space: normal; max-width: 100%; text-align: left; }
.chip:hover { border-color: var(--accent); }
.ask { display: grid; gap: .6rem; }
.ask textarea { min-height: 5.2rem; resize: vertical; }
.ask-actions { display: flex; gap: .6rem; justify-content: space-between; flex-wrap: wrap; }
.ask-actions .btn-main { min-width: 10rem; }
.now { position: sticky; top: 1rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.1rem; }
.now h2 { font-size: 1.05rem; }
.plan, .steps { margin: 0 0 .8rem; padding-left: 1.3rem; display: grid; gap: .35rem; font-size: .92rem; }
.steps { list-style: none; padding-left: 0; }
.steps li::before { content: "✓ "; color: var(--ok); font-weight: 700; }
.steps li.current::before { content: "… "; color: var(--accent); }
.steps li.current { font-weight: 600; color: var(--accent); }
.plan li.completed { color: var(--muted); text-decoration: line-through; }
.plan li.in_progress { font-weight: 700; color: var(--accent); }

/* documents */
.upload { display: grid; gap: .8rem; max-width: 40rem; }
.drop { display: grid; gap: .3rem; place-items: center; text-align: center; padding: 1.8rem 1rem; border: 3px dashed var(--line); border-radius: var(--radius); background: var(--surface); cursor: pointer; }
.drop:hover, .drop.is-over { border-color: var(--accent); background: var(--accent-soft); }
.drop-title { font-weight: 700; font-size: 1.2rem; color: var(--accent); }
.drop input, .camera input { position: absolute; width: 1px; height: 1px; opacity: 0; }
/* The camera button is for phones and tablets: shown on a touch screen only. */
.camera { position: relative; display: none; }
@media (pointer: coarse) { .camera { display: inline-flex; } }
.docs li { overflow-wrap: anywhere; }

/* brain */
.brain-tools { display: flex; flex-wrap: wrap; gap: .8rem; align-items: center; justify-content: space-between; margin: 1rem 0 .4rem; }
.search { display: flex; gap: .5rem; flex: 1 1 26rem; max-width: 40rem; }
.search input { flex: 1; min-width: 0; }
.note { max-width: 50rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.4rem 1.5rem; }
.prose h2 { margin-top: 1.4rem; font-size: 1.1rem; }
.prose ul, .prose ol { padding-left: 1.3rem; }
.prose strong { color: var(--ink); }
.graph { height: 70vh; min-height: 24rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }

/* tour */
.tour { position: fixed; inset: 0; background: rgba(10, 25, 30, .55); display: grid; place-items: center; padding: 16px; z-index: 50; }
.tour[hidden] { display: none; }
.tour-card { background: var(--surface); border-radius: 16px; max-width: 32rem; width: 100%; padding: 1.6rem; box-shadow: 0 20px 50px rgba(0, 0, 0, .25); }
.tour-card h2 { font-size: 1.3rem; }
.tour-actions { display: flex; gap: .6rem; justify-content: flex-end; flex-wrap: wrap; margin-top: 1rem; }
.tour-count { color: var(--muted); font-size: .85rem; }

@media (prefers-reduced-motion: no-preference) {
  .btn, .card, .action, .chip, .tab { transition: border-color .15s ease, background-color .15s ease, color .15s ease; }
}
/* Narrow screens. Kept at the end of the file so they override the rules above. */
@media (max-width: 960px) {
  .chat { grid-template-columns: minmax(0, 1fr); }
  .now { order: -1; position: static; }
}
@media (max-width: 560px) {
  h1 { font-size: 1.4rem; }
  .bubble { max-width: 100%; }
  .ask-actions .btn { width: 100%; }
  /* phone header: the four buttons on one row, the four tabs as a 2×2 grid, nothing hidden */
  .top-in { gap: .5rem; }
  .top-actions { width: 100%; display: grid; grid-template-columns: repeat(4, auto); justify-content: start; gap: .4rem; }
  .top-actions .btn { min-height: 2.6rem; padding: .35rem .7rem; font-size: .9rem; }
  .font { display: contents; }
  .tabs-in { display: grid; grid-template-columns: 1fr 1fr; overflow: visible; }
  .tab { justify-content: center; min-height: 2.9rem; padding: 0 .4rem; white-space: normal; text-align: center; }
}
