/* Web shell layout (P2-23). Colours, type and spacing come from the vendored tokens. */
.w-open .op-dropzone { display: grid; gap: var(--space-3, 0.75rem); justify-items: center; text-align: center; }
.v-view__bar { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-3, 0.75rem); padding-block: var(--space-4, 1rem); }
.v-doc-name { margin: 0; unicode-bidi: isolate; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } /* one line, ellipsis at the end */
.v-view__bar .w-title { flex: 1 1 10rem; min-inline-size: 0; display: flex; align-items: center; gap: var(--space-inline-s, 0.5rem); } /* 10rem basis: on a narrow bar the title wraps under Back instead of squeezing the type label out */
.v-view__bar .w-type { flex: none; }
#stage { padding-block-end: var(--space-6, 2rem); }
#main:focus { outline: none; } /* focus moves here after a file opens; it is a landmark, not a control */
/* Keep the settings at the inline end even when the header wraps (200% text), and the panel inside the screen. */
.w-header__end { margin-inline-start: auto; }
.w-popover__panel { max-inline-size: calc(100vw - 2rem); }
.v-doc { block-size: calc(100dvh - 9rem); min-block-size: 24rem; overflow: auto; }
/* A sheet fills the view from the top bar down: no gap above the grid, light or night (coordinator 22.11). */
#stage:empty:has(+ .v-doc[data-kind="grid"]:not([hidden])) { padding-block-end: 0; }
.v-doc[data-kind="grid"] { block-size: calc(100dvh - 7rem); }
/* Night view inverts a sheet's whole root (engine 1.0.0), so its own surround turned light under the grid in the dark
   theme. The root stays clear, and in Night view the area around the grid is Design's dark page in both themes. */
.v-doc[data-kind="grid"] > * { background: transparent !important; }
.v-doc[data-kind="grid"][data-night] { background: #161412; }
.op-state { overflow-wrap: anywhere; min-inline-size: 0; } /* long words at 200% text on a 320 px screen (WCAG 1.4.10) */
.v-password { display: grid; gap: var(--space-stack-xs, 0.5rem); justify-items: start; margin-block-start: var(--space-stack-s, 0.75rem); }
.v-password__error { color: var(--status-error-text); }
main { overflow-wrap: break-word; } .w-hero__title { hyphens: manual; overflow-wrap: anywhere; } /* long words in the hero at 200% text on 320 px (WCAG 1.4.10); no automatic hyphens (Design 26.11: "docu- ments") */
h1, h2, h3 { hyphens: manual; }
/* Encoding choice inside the band, and the text view toggles (engine 0.3.0, contract section 4d). */
.v-enc { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-inline-s, 0.5rem); flex: 1 1 100%; min-inline-size: 0; }
/* Report form at 320 px with 200 % text (owner audit v2, 28.11): one long word in a heading ("automaticamente") made
   the form column wider than the screen. Headings wrap a word that cannot fit rather than scroll the page. */
#report h2 { overflow-wrap: anywhere; }
.v-enc .w-select { flex: 1 1 10rem; min-inline-size: 0; inline-size: auto; max-inline-size: 100%; }
.v-textrow { display: flex; flex-wrap: wrap; column-gap: var(--space-inline-s, 0.5rem); }
.v-textbar { display: flex; flex-wrap: wrap; gap: var(--space-inline-s, 0.5rem); padding-block-end: var(--space-stack-s, 0.5rem); }
/* Bottom bar at 320 px and 200% text (engine 0.4.0): the pager and zoom labels may shrink and wrap, so the two
   icon buttons and the label fit the width. */
#bottombar .op-pager, #bottombar .op-zoom { max-inline-size: 100%; min-inline-size: 0; }
#bottombar .op-pager__label, #bottombar .op-zoom__label { flex: 0 1 auto; min-inline-size: 0; overflow-wrap: anywhere; }
/* Go to page (guide 0026 section 4.1): a small form under the bottom bar row. */
.v-goto { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-inline-s, 0.5rem); flex: 1 1 100%; min-inline-size: 0; }
.v-goto .op-field__input { inline-size: 6em; max-inline-size: 100%; }
/* Bookmarks (owner 21.11): a popover in the view bar like Settings; each row opens the place or removes it. */
.v-marks .w-popover__panel { min-inline-size: min(18rem, calc(100vw - 2rem)); }
.v-marks__empty { margin: 0; color: var(--text-secondary); }
.v-marks__list { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--space-stack-xs, 0.25rem); }
.v-marks__list li { display: flex; align-items: center; justify-content: space-between; gap: var(--space-inline-s, 0.5rem); }
.v-marks__empty[hidden], .v-marks[hidden] { display: none; }
.v-hint { margin: 0; color: var(--text-secondary); font-size: 0.875em; }
.v-dialog { max-width: min(32rem, calc(100vw - 2rem)); border: 1px solid var(--border-subtle, #ccc); border-radius: var(--radius-m, 12px); background: var(--surface-raised, #fff); color: var(--text-primary, inherit); padding: var(--space-inset-m, 1rem); }
.v-dialog::backdrop { background: rgb(0 0 0 / 0.4); }
.v-dialog h3 { margin: 0 0 0.5rem; font-size: 1.1rem; }
.v-dialog__url { overflow-wrap: anywhere; unicode-bidi: isolate; font-family: var(--font-mono, monospace); font-size: 0.9rem; }
.v-dialog__actions { display: flex; flex-wrap: wrap-reverse; justify-content: flex-end; gap: 0.5rem; margin-top: 1rem; }
/* Narrow or large text (Design print.md, review 29.11): the buttons stack, full width, primary on top; words break only between words. */
.v-dialog { overflow-wrap: normal; hyphens: manual; }
.v-dialog .op-btn { white-space: normal; overflow-wrap: normal; }
@media (max-width: 30em) {
  .v-dialog { max-width: calc(100vw - 32px); }
  .v-dialog__actions { flex-direction: column-reverse; align-items: stretch; }
}
#prepdlg { inline-size: 32rem; }
.v-prep__bar { accent-color: var(--accent-default); }
/* The Markdown switch is a radio group (Design docs/markdown-view.md): the checked option looks like a pressed chip. */
.v-textbar .op-chip[aria-checked="true"] { background: var(--surface-selected); color: var(--text-on-selected); border-color: var(--accent-default); }
.v-sendfile { margin-top: var(--space-stack-m, 1rem); border-top: 1px solid var(--border-subtle, #ddd); padding-top: var(--space-stack-s, 0.5rem); }
/* The document's own zoom takes the pinch (owner 22.11); the page itself still scrolls. */
.v-doc { touch-action: pan-x pan-y; }
.v-menu .w-popover__panel { min-width: 16rem; }
.v-menu__list, .v-menu__sub { list-style: none; margin: 0; padding: 0; }
.v-menu__list > li { padding: 0.15rem 0; }
.v-menu__head { display: block; font-weight: 600; padding: 0.4rem 0.75rem 0.1rem; }
.v-menu__sub .op-btn { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; unicode-bidi: isolate; }
.v-menu .v-hint { padding: 0 0.75rem; }
/* Design web-nav.md (22.11): one top bar in the viewer, a drawer menu, sheets for settings and bookmarks. */
body.is-viewing .w-header { display: none; }
.v-topbar { display: flex; align-items: center; gap: 0.25rem; padding: 0.25rem 0.5rem; border-bottom: 1px solid var(--border-subtle, #ddd); background: var(--surface-raised, #fff); position: sticky; top: 0; z-index: 11; } /* above the dock (10), so a long More panel is not under the bottom bar */
.v-title { flex: 1 1 auto; min-width: 0; display: flex; align-items: center; gap: 0.5rem; }
.v-doc-name { display: flex; min-width: 0; margin: 0; font-size: 1.05rem; white-space: nowrap; }
.v-name__start { overflow: hidden; text-overflow: ellipsis; min-width: 1ch; }
.v-name__end { flex: none; }
.v-topbar__end { display: flex; align-items: center; gap: 0.125rem; flex: none; }
.v-iconlabel { display: inline-flex; align-items: center; gap: 0.375rem; }
.v-wide { display: none; }
@media (min-width: 600px) { .v-wide { display: inline-flex; } .v-narrow { display: none; } }
.v-more .w-popover__panel { inset-inline-end: 0; min-width: min(15rem, calc(100vw - 16px)); max-width: calc(100vw - 16px); max-block-size: calc(100dvh - 4rem); overflow-y: auto; }
/* Search (Design viewer-search.md, owner 26.11): a pill field (search icon, query, count "1/12", clear), then previous,
   next and close. Under 840 px it replaces the bottom bar in the dock, above the on-screen keyboard (--v-kb, set from
   visualViewport); from 840 px it opens under the top bar. */
.v-searchbar { display: flex; flex-wrap: wrap; align-items: center; gap: 0.25rem; padding-block: 0.375rem; }
.v-searchbar[hidden] { display: none; }
.w-dock .v-searchbar { padding-inline: 0.5rem 0.25rem; border-block-start: 1px solid var(--border-subtle); background: var(--surface-raised); }
@media (max-width: 839.98px) {
  .w-dock.v-searching { transform: translateY(calc(-1 * var(--v-kb, 0px))); }
  .w-dock.v-searching .op-bottombar { display: none; }
}
.v-search__field { flex: 1 1 12rem; min-inline-size: 0; display: flex; align-items: center; gap: 0.25rem; min-block-size: 48px; padding-inline: 0.75rem 0; border: 2px solid transparent; border-radius: var(--radius-pill); background: var(--surface-hover); }
.v-searchbar.w-wrap .v-search__field { max-inline-size: 40rem; }
.v-search__field:focus-within { border-color: var(--accent-default); }
.v-search__icon { flex: none; inline-size: 20px; block-size: 20px; color: var(--text-secondary); }
.v-search__input { flex: 1 1 auto; min-inline-size: 0; border: 0; outline: 0; background: transparent; color: var(--text-primary); font: inherit; padding-block: 0.5rem; }
.v-search__input::-webkit-search-cancel-button { appearance: none; }
.v-search__input:focus-visible { outline: 0; }
.v-search__count { flex: none; padding-inline: 0.25rem; font: var(--type-label-m-weight) var(--type-label-m-size) / var(--type-label-m-line) var(--font-ui); font-variant-numeric: tabular-nums; color: var(--text-secondary); }
.v-search__count:empty { display: none; }
.v-search__count.is-none { color: var(--status-error-text); }
.v-search__clear { flex: none; inline-size: 48px; block-size: 48px; }
/* 200% text: the count leaves the field for a line above the bar, start aligned. */
.v-searchbar { position: relative; }
.v-search--stack .v-search__count { position: absolute; inset-block-end: 100%; inset-inline-start: 0; padding: 0.25rem 0.75rem; background: var(--surface-raised); }
.v-drawer { margin: 0; inset-inline-start: 0; inset-inline-end: auto; inset-block: 0; height: 100%; max-height: 100%; width: min(320px, 85vw); max-width: 85vw; border-radius: 0; border-inline-end: 1px solid var(--border-subtle, #ddd); padding: 0.75rem 0.5rem; }
.v-drawer .v-menu__list > li > .op-btn { width: 100%; justify-content: flex-start; }
.v-more .v-menu__list > li > .op-btn { width: 100%; justify-content: flex-start; text-align: start; }
.v-menu__divider { border-top: 1px solid var(--border-subtle, #ddd); margin: 0.375rem 0; }
.v-drawer .w-privacy-line { padding: 0.75rem; }
.v-sheet { width: min(32rem, calc(100vw - 2rem)); }
@media (max-width: 599px) { .v-sheet { margin: auto 0 0; width: 100%; max-width: 100%; border-radius: var(--radius-m, 12px) var(--radius-m, 12px) 0 0; } }
.v-zoommenu summary { list-style: none; cursor: pointer; }
.v-zoommenu summary::-webkit-details-marker { display: none; }
.v-zoommenu .w-popover__panel { inset-block-end: calc(100% + 0.25rem); inset-block-start: auto; min-width: 12rem; }
.v-zoomform { display: flex; flex-wrap: wrap; align-items: center; gap: 0.375rem; padding: 0.375rem 0.75rem; }
.v-zoomform .op-field__input { width: 5.5rem; }
.v-btnlabel { margin-inline: 0.25rem; }
.v-topbar .v-out { display: none; }
/* The clip is on the title, not the bar: the More panel hangs below the bar (Design review 29.11, the bar's clip hid it). */
.v-title { overflow: hidden; }
/* W10: from 600 px the previous and next buttons carry their labels on one line. */
@media (min-width: 600px) {
  .op-pager .op-icon-btn { inline-size: auto; min-inline-size: var(--target-web, 44px); padding-inline: 0.5rem; gap: 0.25rem; }
  .v-btnlabel { white-space: nowrap; }
  .op-bottombar { padding-inline: 1rem; }
}
.v-recent { margin-top: var(--space-stack-l, 1.5rem); }
.v-recent .op-btn { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; unicode-bidi: isolate; }
/* Privacy notice and terms of use links after the drawer's privacy line (owner 22.11). */
.v-legal { margin-inline-start: auto; }
/* File type icons in the recent lists (OFP-003): the set follows the theme, like the word logo. */
.v-recent__item { display: inline-flex; align-items: center; gap: var(--space-inline-s, 0.5rem); text-align: start; }
.v-recent__item > span { min-inline-size: 0; overflow-wrap: anywhere; }
.v-ft { flex: none; inline-size: 2.5rem; block-size: 2.5rem; }
.v-ft--dark { display: none; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .v-ft--light { display: none; } :root:not([data-theme="light"]) .v-ft--dark { display: block; } }
:root[data-theme="dark"] .v-ft--light { display: none; }
:root[data-theme="dark"] .v-ft--dark { display: block; }
/* Both icon sprites load with every page, whatever file is opened or not (P2-26). */
.v-sprite-load { position: absolute; inline-size: 0; block-size: 0; overflow: hidden; }
/* While a document is open the view fills the window and scrolls inside: the page footer would add a second
   scrollbar (owner test 23.11). Report a problem stays in the menu. */
body.is-viewing .w-footer { display: none; }
/* OfisPro word logo at the start of the bottom bar, a link to the home page (Design viewer-mark.md, comms 0011):
   logo 20 px high, 48 px target, 16 px from the start edge. Hidden under 400 px; the shell script also hides it when the
   bar would wrap, so the pager and zoom keep their place. */
.w-brand { display: inline-flex; align-items: center; flex: none; min-block-size: 48px; min-inline-size: 48px; margin-inline-start: calc(16px - var(--space-inline-xs)); border-radius: var(--radius-control); }
.w-brand__logo { block-size: 20px; inline-size: auto; }
@media (min-width: 600px) { .w-brand { margin-inline-start: 0; } }
@media (max-width: 399.98px) { .w-brand { display: none; } }
/* Search button: the last item of the bottom bar under 840 px, in the top bar from 840 px. */
@media (max-width: 839.98px) { #search-btn { display: none; } }
@media (min-width: 840px) { #search-btn-bar { display: none; } }
/* A full bottom bar (fitBottombar in the shell): a tighter zoom label, then the pager without button labels and its indicator as "3/12". */
.v-tight-zoom .op-zoom__label { min-inline-size: 0; padding-inline: 0.125rem; }
.v-tight-zoom .op-zoom { gap: 0; }
.v-tight-pager #page-label { font-size: 0; min-inline-size: 0; padding-inline: 0.25rem; }
.v-tight-pager .op-pager .v-btnlabel { display: none; }
.v-tight-pager .op-pager .op-icon-btn { inline-size: var(--target-web); padding-inline: 0; }
.v-tight-pager #page-label::after { content: attr(data-short); content: attr(data-short) / ""; font: var(--type-label-m-weight) var(--type-label-m-size) / var(--type-label-m-line) var(--font-ui); }
.v-tight-pager .op-pager { gap: 0; }
/* Terms of Use acceptance on the start view (owner 26.11, legal v3.0): one line (it wraps on a phone) with the two
   links and the Accept button, above the drop zone. */
.v-terms { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-inline-s, 0.5rem) var(--space-inline-m, 1rem); margin-block-end: var(--space-stack-m, 1rem); padding: 0.75rem 1rem; border: 1px solid var(--border-subtle); border-radius: var(--radius-control); background: var(--surface-raised); }
.v-terms__text { flex: 1 1 16rem; margin: 0; }
.v-terms__text a, #about-legal a { color: var(--text-link); }
.v-terms__text a { display: inline-block; max-inline-size: 100%; margin-inline-start: 0.25rem; } /* inline links in the sentence: one piece when it fits, wrapped inside at 200% text on 360 px */
/* Design review 26.11: at 200% text the top bar keeps the type badge and about 8 characters of the name (fitTopbar
   moves Text view, Search and Open file into the menus first); labels in the bars never break inside. */
#bottombar .op-pager__label, #bottombar .op-zoom__label { white-space: nowrap; overflow-wrap: normal; }
.v-tight-pager #zoom-fit { display: none; } /* Fit width stays in the zoom menu */
/* The acceptance card's top lines up with the headline at desktop width. */
@media (min-width: 840px) { .w-hero:has(#terms-bar:not([hidden])) { align-items: start; } }
/* Last stage (large text): the bar's icon buttons keep the 48 px touch target instead of growing with the text, and the
   labels lose their side padding, so pager, zoom and search stay on one line at 360 px and 200% text. */
.v-tight-icons .op-icon-btn, .v-tight-icons .v-more > summary, .v-tight-pager.v-tight-icons .op-pager .op-icon-btn { inline-size: 48px; min-inline-size: 48px; block-size: 48px; }
.v-tight-icons .op-icon { inline-size: 24px; block-size: 24px; }
.v-tight-icons #page-label, .v-tight-icons .op-zoom__label { padding-inline: 0.125rem; }
/* After that, on the narrowest bar the pager is its two icon buttons: the page number stays for screen readers (it is
   the live label) and in More > Go to page. */
.v-tight-label #page-label { position: absolute; inline-size: 1px; block-size: 1px; min-inline-size: 0; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
/* "Kabul et ve devam et" at 200% text on 360 px: the button may wrap instead of widening the page. */
.v-terms .op-btn { max-inline-size: 100%; white-space: normal; text-align: center; }
.v-topbar.v-tight-icons { gap: 0; padding-inline: 0.25rem; }
.v-topbar.v-tight-icons .v-title { gap: 0.25rem; }
/* Design 26.11: on a phone the start header stays one row at 200% text: logo 28 px at normal text, down to 20 px at
   200% (56px - 1.75rem), buttons at most 48 px. */
@media (max-width: 599px) {
  .w-header__row { flex-wrap: nowrap; }
  .w-header .w-logo { block-size: max(20px, min(1.75rem, calc(56px - 1.75rem))); }
  .w-header .op-icon-btn { inline-size: min(var(--target-web), 48px); block-size: min(var(--target-web), 48px); }
  .w-header .op-icon { inline-size: 24px; block-size: 24px; }
}
/* The pager's "Previous page" / "Next page" labels at the size of the other bar labels (Design 26.11). */
.v-btnlabel { font: var(--type-label-m-weight) var(--type-label-m-size) / var(--type-label-m-line) var(--font-ui); }
.v-prep__bar { display: block; inline-size: 100%; margin-block: var(--space-3, 0.75rem); }
/* Print (P4-18): only the open document goes to paper, at its full height and on white; the browser sets the page
   margins. The shell switches to the light theme without night view for the print (beforeprint, afterprint). */
@media print {
  html, body, main, #view, .v-doc { background: #fff !important; }
  body.is-viewing > :not(main), body.is-viewing main > :not(#view), body.is-viewing #view > :not(#doc) { display: none !important; }
  body.is-viewing .v-doc, body.is-viewing .v-doc[data-kind="grid"] { block-size: auto !important; min-block-size: 0 !important; overflow: visible !important; }
}
